-
Notifications
You must be signed in to change notification settings - Fork 15
33 lines (26 loc) · 1.11 KB
/
deploy-testnet-explorer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 "/*"