chore(deps): update yarn to v4.3.0 (#1070) #319
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: Deploy to Production (main) | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: deploy-to-prod | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: deploy-to-prod | |
timeout-minutes: 120 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_PAT_CHECKOUT }} | |
submodules: "recursive" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".node-version" | |
cache: "yarn" | |
- uses: actions/cache/restore@v4 | |
with: | |
path: | | |
public | |
.cache | |
key: gatsby-v1-${{ hashFiles('public') }} | |
restore-keys: | | |
gatsby-v1- | |
- run: yarn install --immutable | |
- run: yarn build | |
env: | |
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
GTM_ID: ${{ vars.GTM_ID }} | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
role-duration-seconds: 7200 | |
mask-aws-account-id: true | |
- run: yarn deploy | |
env: | |
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
- run: | | |
aws cloudfront create-invalidation \ | |
--distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} \ | |
--paths "/*" | |
- uses: actions/cache/save@v4 | |
with: | |
path: | | |
public | |
.cache | |
key: gatsby-v1-${{ hashFiles('public') }} |