forked from privacyguides/privacyguides.org
-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (63 loc) · 2.29 KB
/
test-ipfs.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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build IPFS Website
on:
workflow_dispatch:
permissions:
contents: read
statuses: write
jobs:
build:
runs-on: ubuntu-latest
environment:
name: dweb
url: https://cloudflare-ipfs.com/ipns/ipfs.privacyguides.org/en/index.html
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: "false"
- name: Python setup
uses: actions/setup-python@v5
- name: Install Python dependencies
run: |
pip install mkdocs-material
sudo apt install pngquant
- name: Build website
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARDS: false
run: |
mkdocs build --config-file config/mkdocs-offline.yml
mkdocs --version
- id: deploy
run: |
wget https://dist.ipfs.tech/ipfs-cluster-ctl/v1.0.8/ipfs-cluster-ctl_v1.0.8_linux-amd64.tar.gz
tar xvf ipfs-cluster-ctl_v1.0.8_linux-amd64.tar.gz
./ipfs-cluster-ctl/ipfs-cluster-ctl --version
root_cid=$(./ipfs-cluster-ctl/ipfs-cluster-ctl \
--host '/dns/cluster.ipfs.jonaharagon.net/tcp/443/tls/sni/cluster.ipfs.jonaharagon.net' \
--basic-auth ${{ secrets.CLUSTER_USERNAME }}:${{ secrets.CLUSTER_PASSWORD }} \
add \
--quieter \
--local \
--wait \
--cid-version 1 \
--name "https://github.com/$GITHUB_REPOSITORY/commits/$GITHUB_SHA" \
--recursive site )
echo "cid=$root_cid" >> $GITHUB_OUTPUT
# - id: cluster_deploy
# uses: ipfs-shipyard/[email protected]
# with:
# path_to_add: site
# cluster_host: /dns/cluster.ipfs.jonaharagon.net/tcp/443
# cluster_user: ${{ secrets.CLUSTER_USERNAME }}
# cluster_password: ${{ secrets.CLUSTER_PASSWORD }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: textileio/cloudflare-update-dnslink@30414a408191218c8259e932ebdf4cbb7c652fe8
with:
cid: ${{ steps.deploy.outputs.cid }}
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE }}
RECORD_DOMAIN: privacyguides.org
RECORD_NAME: _dnslink.ipfs