-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.77 KB
/
push-stg.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
51
52
53
54
55
56
name: Deploy to S3 Stg
on:
push:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
# checkout module
- uses: actions/checkout@v1
# Specify node version
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm 7
run: npm i -g npm@7 --registry=https://registry.npmjs.org
- name: install and build prod
env:
NODE_ENV: 'stg'
TOKEN: ${{ secrets.ORG_PERSONAL_GITHUB_WRITE_PACKAGE_TOKEN }}
NEXT_PUBLIC_UPBOND_BUILD_ENV: 'production'
REACT_APP_PROJECT_ID: '8f6f7b9fc77c3aff921ff4c981b11bc8'
run: |
cd ./example/
npm install --legacy-peer-deps
DISABLE_ESLINT_PLUGIN=true npm run build
# Deploy to S3 bucket
- name: upload-s3
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: 'wallet-rainbowkit-connector'
AWS_ACCESS_KEY_ID: ${{ secrets.ORG_DEMO_FRONT_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ORG_DEMO_FRONT_S3_SECRET_KEY }}
AWS_REGION: 'ap-northeast-1' # optional: defaults to us-east-1
SOURCE_DIR: './example/build' # optional: defaults to entire repository
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: 'E1NZ019IVKDBQ3'
PATHS: '/index.html'
AWS_REGION: 'ap-northeast-1'
AWS_ACCESS_KEY_ID: ${{ secrets.ORG_DEMO_FRONT_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ORG_DEMO_FRONT_S3_SECRET_KEY }}