forked from cryptonative-ch/aqua-interface
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.56 KB
/
preview-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: IPFS Preview Deploy
on:
push:
branches:
- dev
pull_request:
types: [opened, synchronize, reopened]
jobs:
develop-ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Inject slug variables
uses: rlespinasse/[email protected]
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Start Deployment
uses: bobheadxi/[email protected]
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ env.GITHUB_HEAD_REF_SLUG_URL || env.GITHUB_REF_SLUG_URL }}
ref: ${{ github.head_ref }}
- name: Remove dependencies
run: rm -rf package-lock.json node_modules
- name: Install dependencies
run: npm install
- name: Build Dapp
run: npm run build:xdai
- name: Deploy to IPFS
uses: web3-storage/add-to-web3@v1
id: web3
with:
web3_token: ${{ secrets.WEB3_STORAGE_TOKEN }}
path_to_add: 'build'
- name: Update Deployment Status
uses: bobheadxi/[email protected]
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: 'https://${{ steps.web3.outputs.cid }}.ipfs.dweb.link'