File tree 7 files changed +6568
-3897
lines changed
7 files changed +6568
-3897
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+ jobs :
3
+ build :
4
+ docker :
5
+ - image : circleci/node:10.15.1
6
+ steps :
7
+ - checkout
8
+ - run :
9
+ command : npm ci
10
+ - run :
11
+ command : npm run build
12
+ - persist_to_workspace :
13
+ root : .
14
+ paths :
15
+ - dist
16
+
17
+ deploy :
18
+ docker :
19
+ - image : olizilla/ipfs-dns-deploy:latest
20
+ environment :
21
+ DOMAIN : cid.ipfs.io
22
+ BUILD_DIR : dist
23
+ steps :
24
+ - attach_workspace :
25
+ at : /tmp/workspace
26
+ - run :
27
+ name : Deploy website to IPFS
28
+ command : |
29
+ pin_name="$DOMAIN build $CIRCLE_BUILD_NUMBER"
30
+
31
+ hash=$(pin-to-cluster.sh "$pin_name" /tmp/workspace/$BUILD_DIR)
32
+
33
+ echo "Website added to IPFS: https://ipfs.io/ipfs/$hash"
34
+
35
+ # Update DNSlink for prod or dev domain
36
+ if [ "$CIRCLE_BRANCH" == "master" ] ; then
37
+ dnslink-dnsimple -d $DOMAIN -r _dnslink -l /ipfs/$hash
38
+ fi
39
+
40
+ workflows :
41
+ version : 2
42
+ build-deploy :
43
+ jobs :
44
+ - build
45
+ - deploy :
46
+ context : ipfs-dns-deploy
47
+ requires :
48
+ - build
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments