-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.26 KB
/
build-and-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
name: release website
on:
push:
branches: [realm]
jobs:
build-and-release:
name: Build App and release
runs-on: ubuntu-latest
env:
BUCKET: shikengno.xyz
DIST: build
REGION: us-east-1
REPO_COSMJS: https://github.com/cosmos/cosmjs.git
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.REGION }}
- name: Install dependencies
run: |
node --version
npm ci --production
- name: Build website
run: |
ls
git clone ${{ env.REPO_COSMJS }}
for p in amino crypto encoding ledger-amino math utils
do
echo " > Fixing issues in $p"
cp -r cosmjs/packages/$p/src node_modules/@cosmjs/$p
done
npm run build
- name: Delete old files to AWS
run: |
aws s3 ls s3://${{ env.BUCKET }}
aws s3 rm --recursive s3://${{ env.BUCKET }}/
- name: Add new files to AWS
run: |
aws s3 sync build/ s3://${{ env.BUCKET }}/ --delete