-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77022a4
commit 760ac11
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: wds-code-front-arbitrum-deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
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 | ||
|
||
- 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 | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run 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 "/*" |