-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (51 loc) · 1.86 KB
/
release-ipfs-prod.yaml
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
name: Release IPFS Prod
on:
push:
branches:
- main
jobs:
create_release:
name: Create IPFS Release
runs-on: ubuntu-latest
environment: prod
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install and Build
run: |
npm install
npm run graphql:build
npm run build:ipfs
env:
NEXT_PUBLIC_INFURA_API_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_API_KEY }}
NEXT_PUBLIC_ALCHEMY_API_KEY: ${{ secrets.NEXT_PUBLIC_ALCHEMY_API_KEY }}
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }}
NEXT_PUBLIC_ETHERSCAN_API_KEY: ${{ secrets.NEXT_PUBLIC_ETHERSCAN_API_KEY }}
NEXT_PUBLIC_INFURA_IPFS_API_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_IPFS_API_KEY }}
NEXT_PUBLIC_INFURA_IPFS_API_SECRET: ${{ secrets.NEXT_PUBLIC_INFURA_IPFS_API_SECRET }}
- name: IPFS Pinata deploy GitHub action
uses: decent-dao/[email protected]
id: upload
with:
pin-name: 'app.fractalframework.xyz'
path: './out/'
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}
- name: Convert CIDv0 to CIDv1
id: convert_cidv0
uses: decent-dao/[email protected]
with:
cidv0: ${{ steps.upload.outputs.hash }}
- name: Update DNS with new IPFS hash
uses: textileio/cloudflare-update-dnslink@v2
with:
cid: ${{ steps.convert_cidv0.outputs.cidv1 }}
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
RECORD_DOMAIN: 'fractalframework.xyz'
RECORD_NAME: '_dnslink.app'
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}