Skip to content

Add GitHub Action Node Option #6

Add GitHub Action Node Option

Add GitHub Action Node Option #6

name: welldone-aptos-explorer
on:
push:
branches:
- explorer
permissions:
id-token: write
contents: read
#env:
# REACT_APP_STAGE: ${{secrets.REACT_APP_STAGE}}
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_DEFAULT_REGION: 'us-east-2'
steps:
- uses: actions/checkout@master
- uses: pnpm/action-setup@v2
with:
version: 8.6.11
run_install: false
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::116580135187:role/wds-code-remix-github-action-s3-deploy
role-session-name: wds-code-remix-github-action-s3-deploy
aws-region: us-east-2
- name: Install dependencies
env:
NODE_OPTIONS: "--max_old_space_size=8192"
run: pnpm install
- name: Build
env:
NODE_OPTIONS: "--max_old_space_size=8192"
run: pnpm build
# - name: After Build
# run: npm run postbuild
- name: Upload file to S3 bucket
run: aws s3 sync ./build s3://${{ secrets.AWS_S3_BUCKET }}
- name: Invalidate cache CloudFront
run: aws cloudfront create-invalidation --distribution-id ${{secrets.DISTRIBUTION_ID}} --paths "/*"