-
Notifications
You must be signed in to change notification settings - Fork 16
44 lines (36 loc) · 1.32 KB
/
deploy_app.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
name: Smart Forms App S3 Deployment Workflow
on:
push:
branches: ['main']
jobs:
build:
name: Deploy Smart Forms app to S3
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: 16
cache: npm
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::209248795938:role/SmartFormsReactAppDeployment
aws-region: ap-southeast-2
- name: Install dependencies
run: npm ci
- name: Build application
run: npm run build -w apps/smart-forms-app
# export REACT_APP_SENTRY_RELEASE=`git rev-parse --short HEAD`
# - name: Create Sentry release
# run: |
# export VERSION=`git rev-parse --short HEAD` && \
# npx sentry-cli releases new $VERSION && \
# npx sentry-cli releases set-commits $VERSION --local --ignore-empty --ignore-missing && \
# npx sentry-cli releases files $VERSION upload-sourcemaps build
- name: Upload static React site to S3
run: aws s3 sync apps/smart-forms-app/dist s3://smart-forms-react-app/