Skip to content

Merge pull request #1033 from aehrc/issue/997 #141

Merge pull request #1033 from aehrc/issue/997

Merge pull request #1033 from aehrc/issue/997 #141

Workflow file for this run

name: Smart Forms App Deployment Workflow
on:
push:
branches: ['main']
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
name: Deploy Smart Forms app to S3
runs-on: ubuntu-latest
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/
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Run Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/smart-forms-renderer