-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.13 KB
/
dev.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
name: Sdk Dev Deployment
on:
push:
branches:
- dev
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.18.0]
steps:
- uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Generate build
run: |
yarn install
yarn run build
env:
CI: false
NODE_OPTIONS: --max_old_space_size=4096
REACT_APP_PKEY: ${{ secrets.REACT_APP_PKEY }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_DEV_ROLE_ARN }}
role-session-name: dev-deploy
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# publish to dev environment
- name: Deploy to S3
run: |
aws s3 sync build s3://${{ secrets.DEV_S3_BUCKET_NAME }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.DEV_CF_ID }} --paths /