forked from filecoin-project/specs
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.33 KB
/
main.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
name: CI
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14'
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
- run: npm install
- run: npm run build
# Pin the built site to ipfs-cluster, output the cid as `steps.ipfs.outputs.cid`
# see: https://github.com/ipfs-shipyard/ipfs-github-action
- uses: ipfs-shipyard/[email protected]
id: ipfs
with:
path_to_add: public
cluster_host: /dnsaddr/cluster.ipfs.io
cluster_user: ${{ secrets.CLUSTER_USER }}
cluster_password: ${{ secrets.CLUSTER_PASSWORD }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo /ipfs/${{ steps.ipfs.outputs.cid }}
- run: echo ${{ github.ref }}
# This branch updates a dnslink for a domain if the current branch should be deployed to prod.
# see https://github.com/ipfs-shipyard/js-dnslink-dnsimple
- run: npx dnslink-dnsimple --domain beta.spec.filecoin.io --link /ipfs/${{ steps.ipfs.outputs.cid }}
env:
DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }}
# TODO: change to master once merged.
if: github.ref == 'refs/heads/beta'