Merge pull request #145 from bcnmy/supported_chains #107
This file contains 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: Production Deployment | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.17.1] | |
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 / |