-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: testnet deploy ci script (#538)
- Loading branch information
Sergio
committed
Nov 28, 2023
1 parent
60b4e9c
commit 983c3f2
Showing
2 changed files
with
41 additions
and
36 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
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,39 @@ | ||
name: RNS build and deploy | ||
|
||
on: | ||
push: | ||
branches: [testnet] | ||
|
||
jobs: | ||
testnet_build_and_deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "14" | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Build site | ||
run: yarn build:testnet | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.TESTNET_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.TESTNET_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.TESTNET_AWS_REGION }} | ||
|
||
- name: Deploy site to S3 | ||
run: | | ||
aws s3 sync --delete --only-show-errors build/ ${{ secrets.TESTNET_S3_BUCKET }} | ||
- name: Invalidate CloudFront cache | ||
run: | | ||
aws cloudfront create-invalidation --distribution-id ${{ secrets.TESTNET_CLOUDFRONT_DISTRIBUTION }} --paths "/*" |