Skip to content

Merge pull request #784 from aehrc/issue/692 #1

Merge pull request #784 from aehrc/issue/692

Merge pull request #784 from aehrc/issue/692 #1

Workflow file for this run

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/