Repository navigation
bump versions (renderer 1.2.12, template-extract 1.0.15) and update c… #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Smart Forms App Deployment Workflow | |
| on: | |
| push: | |
| # Only run this workflow when changes are pushed to the main branch | |
| branches: ['main'] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Deploy Smart Forms app to S3 | |
| runs-on: ubuntu-latest | |
| # Conditional logic to skip if workflow is triggered by Dependabot | |
| if: github.actor != 'dependabot[bot]' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| 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 workspace packages (monorepo dependencies) | |
| run: | | |
| npm run build -w packages/sdc-assemble | |
| npm run build -w packages/sdc-populate | |
| npm run build -w packages/sdc-template-extract | |
| npm run build -w packages/smart-forms-renderer | |
| - 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/ \ | |
| --cache-control "no-cache, no-store, must-revalidate" \ | |
| --expires 0 \ | |
| --exact-timestamps \ | |
| --delete | |
| chromatic: | |
| name: Run Chromatic | |
| runs-on: ubuntu-latest | |
| # Conditional logic to skip if workflow is triggered by Dependabot | |
| if: github.actor != 'dependabot[bot]' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build workspace packages (monorepo dependencies) | |
| run: | | |
| npm run build -w packages/sdc-assemble | |
| npm run build -w packages/sdc-populate | |
| npm run build -w packages/sdc-template-extract | |
| - name: Run Chromatic | |
| uses: chromaui/action@latest | |
| with: | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| workingDir: packages/smart-forms-renderer |