forked from Consensys/starknet-snap
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.43 KB
/
publish-dapp.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Publish Dapp
on:
workflow_call:
secrets:
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
AWS_CLOUDFRONT_DISTRIBUTIONS_ID:
required: true
AWS_S3_URL:
required: true
jobs:
deploy-wallet-ui:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
- uses: actions/cache@v3
id: restore-build
with:
path: |
./packages/wallet-ui/build/*
./node_modules/.yarn-state.yml
key: ${{ github.sha }}
- name: Deploy to AWS
run: |
echo "Deployed Dapp to : $AWS_S3_URL"
env:
AWS_S3_URL: ${{ secrets.AWS_S3_URL }}
- name: Invalid aws cloudfront cache
run: |
echo "Distribution ID : $AWS_CLOUDFRONT_DISTRIBUTIONS_ID"
echo "$AWS_CLOUDFRONT_DISTRIBUTIONS_ID" | tr ',' '\n' | while read -r DISTRIBUTIONS_ID
do
echo "Processing Distribution ID : $DISTRIBUTIONS_ID"
done
env:
AWS_CLOUDFRONT_DISTRIBUTIONS_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTIONS_ID }}