Merge pull request #216 from rsksmart/revert-215-new-search-rns-integ… #21
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: RSK Explorer testnet build and deploy | |
on: | |
push: | |
branches: [develop] | |
jobs: | |
testnet_build_and_deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "16" | |
- name: Install dependencies | |
run: npm ci | |
- name: Build site | |
run: npm run build-with-tracking:testnet | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.TESTNET_ROLE_ARN }} | |
aws-region: ${{ secrets.TESTNET_AWS_REGION }} | |
- name: Deploy site to S3 | |
run: | | |
aws s3 sync --sse aws:kms --sse-kms-key-id ${{ secrets.TESTNET_KMS_KEY_ID }} --delete --only-show-errors --exclude .gitkeep dist/ ${{ secrets.TESTNET_S3_BUCKET }} | |
- name: Invalidate CloudFront cache | |
run: | | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.TESTNET_CLOUDFRONT_DISTRIBUTION }} --paths "/*" |