-
Notifications
You must be signed in to change notification settings - Fork 109
61 lines (51 loc) · 1.51 KB
/
deploy.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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Deploy
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
jobs:
deploy_ipfs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# build
- name: prepare env
run: cp ${ENV:-'.github/.env.staging'} .env
- uses: ./.github/actions/build
# track size
- name: track size
run: npm run analyze -- --json stats-master.json
shell: bash
- name: cache bundle size
uses: actions/cache@v2
with:
path: stats-master.json
key: stats-master
# upload to ipfs
- name: pinata
id: pinata
uses: aave/pinata-action@v1.1
with:
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_SECRET_KEY: ${{ secrets.PINATA_SECRET_KEY }}
PIN_ALIAS: staging
BUILD_LOCATION: './build'
CID_VERSION: 1
- name: crust
uses: crustio/ipfs-crust-action@18f5ab4e8496351cfaca10a55ced7119cb0fe677
continue-on-error: true
timeout-minutes: 2
with:
cid: ${{ steps.pinata.outputs.hash }}
seeds: ${{ secrets.CRUST_SEEDS }}
- name: deploy
id: deploy
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ZONE_ID: ${{ secrets.CF_ZONE_ID }}
HASH: ${{ steps.pinata.outputs.hash }}
CF_DEPLOYMENT_DOMAIN: staging-classic.aave.com
run: node scripts/update-cloudflare.js