-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.61 KB
/
dev_s3_deploy.yml
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: kaia-safe-react dev deploy workflow
on:
push:
branches:
- dev
jobs:
deploy:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Get AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE_ARN_DEV }}
role-session-name: SessionForKlaytnActions
aws-region: ${{ secrets.AWS_REGION_DEV }}
- name: Installing Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: |
yarn install --frozen-lockfile && yarn after-install
cp ./override/utils.js ./node_modules/@safe-global/safe-gateway-typescript-sdk/dist
- name: Build static files
env:
NEXT_PUBLIC_GATEWAY_URL_PRODUCTION: ${{ secrets.NEXT_PUBLIC_GATEWAY_URL_DEV }}
NEXT_PUBLIC_IS_PRODUCTION: ${{ secrets.NEXT_PUBLIC_IS_PRODUCTION }}
NEXT_PUBLIC_IS_OFFICIAL_HOST: ${{ secrets.NEXT_PUBLIC_IS_OFFICIAL_HOST }}
NEXT_PUBLIC_WC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_WC_PROJECT_ID_DEV }}
NODE_OPTIONS: "--max_old_space_size=8192"
run: yarn build
- name: Sync to S3 bucket and validation cloudfront
env:
S3_BUCKET: ${{ secrets.S3_BUCKET_DEV }}
CLOUDFRONT_ID: ${{ secrets.CLOUDFRONT_ID_DEV }}
run: |
aws s3 sync ./out $S3_BUCKET --delete
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_ID --paths "/*"