Deploy explorer to testnet #15
Workflow file for this run
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 explorer to testnet | |
on: | |
workflow_dispatch: | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_TESTNET }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_TESTNET }} | |
AWS_DEFAULT_REGION: eu-central-1 | |
AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID_TESTNET }} | |
AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME_TESTNET }} | |
VITE_BACKEND_URL: https://backend.testnet.alephium.org | |
VITE_NETWORK_TYPE: testnet | |
VITE_NODE_URL: https://node.testnet.alephium.org | |
jobs: | |
deploy-testnet-explorer: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: 🏗 Setup monorepo | |
uses: ./.github/actions/setup-monorepo | |
- name: Build frontend | |
run: cd apps/explorer && pnpm run ci:build && pnpm init-docker | |
- name: Sync files to S3 | |
run: aws s3 sync ./apps/explorer/build/ s3://$AWS_BUCKET_NAME --acl public-read --delete --cache-control max-age=604800 | |
- name: Notify CloudFront about the changes | |
run: aws cloudfront create-invalidation --distribution-id ${AWS_DISTRIBUTION_ID} --paths "/*" |