Skip to content

Merge pull request #74 from bcnmy/rc/methodupdates #49

Merge pull request #74 from bcnmy/rc/methodupdates

Merge pull request #74 from bcnmy/rc/methodupdates #49

Workflow file for this run

name: Production Deployment
on:
push:
branches:
- master
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.16.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 }}
# TODO: update build stage to use new build command
- name: Generate build
run: |
yarn install
yarn run build
env:
CI: false
NODE_OPTIONS: --max_old_space_size=4096
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: production-deploy
aws-region: us-east-1
# publish to prod environment
- name: Deploy to S3
run: |
aws s3 sync build s3://${{ secrets.PROD_S3_BUCKET_NAME }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.PROD_CF_ID }} --paths /