Skip to content

Commit d32b9a3

Browse files
committed
ci: update IPFS and DNSLink deployment
1 parent 0559db5 commit d32b9a3

File tree

1 file changed

+31
-20
lines changed

1 file changed

+31
-20
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
runs-on: ubuntu-latest
2727
outputs:
2828
cid: ${{ steps.deploy.outputs.cid }}
29+
environment:
30+
name: 'ipfs-publish'
31+
url: "https://${{ steps.deploy.outputs.cid }}.ipfs.dweb.link"
2932
steps:
3033
- name: Checkout code
3134
uses: actions/checkout@v4
@@ -48,26 +51,34 @@ jobs:
4851
with:
4952
path: ${{ env.BUILD_PATH }}
5053

51-
# - uses: ipfs/ipfs-deploy-action@v1
52-
# name: Deploy to IPFS
53-
# id: deploy
54-
# with:
55-
# path-to-deploy: ${{ env.BUILD_PATH }}
56-
# storacha-key: ${{ secrets.STORACHA_KEY }}
57-
# storacha-proof: ${{ secrets.STORACHA_PROOF }}
58-
# github-token: ${{ github.token }}
59-
60-
# - name: Update DNSLink
61-
# if: github.ref == 'refs/heads/main' # only update DNSLink for main branch
62-
# uses: ipfs/dnslink-action@v0.1
63-
# with:
64-
# cid: ${{ steps.deploy.outputs.cid }}
65-
# dnslink_domain: 'helia.io'
66-
# cf_record_id: ${{ secrets.CF_DNS_RECORD_ID }}
67-
# cf_zone_id: ${{ secrets.CF_DNS_ZONE_ID }}
68-
# cf_auth_token: ${{ secrets.CF_DNS_AUTH_TOKEN }}
69-
# github_token: ${{ github.token }}
70-
# set_github_status: true
54+
- uses: ipfs/ipfs-deploy-action@v1
55+
name: Deploy to IPFS
56+
id: deploy
57+
with:
58+
path-to-deploy: ${{ env.BUILD_PATH }}
59+
cluster-url: "/dnsaddr/ipfs-websites.collab.ipfscluster.io"
60+
cluster-user: ${{ secrets.CLUSTER_USER }}
61+
cluster-password: ${{ secrets.CLUSTER_PASSWORD }}
62+
github-token: ${{ github.token }}
63+
64+
dnslink-update:
65+
runs-on: 'ubuntu-latest'
66+
needs: build-and-deploy
67+
environment:
68+
name: 'cf-dnslink'
69+
url: "https://helia-io.ipns.dweb.link/"
70+
steps:
71+
- name: Update DNSLink
72+
if: github.ref == 'refs/heads/main' # only update DNSLink for main branch
73+
uses: ipfs/dnslink-action@v0.1
74+
with:
75+
cid: ${{ needs.build-and-deploy.outputs.cid }}
76+
dnslink_domain: 'helia.io'
77+
cf_record_id: ${{ secrets.CF_DNS_RECORD_ID }}
78+
cf_zone_id: ${{ secrets.CF_DNS_ZONE_ID }}
79+
cf_auth_token: ${{ secrets.CF_DNS_AUTH_TOKEN }}
80+
github_token: ${{ github.token }}
81+
set_github_status: true
7182

7283
gh-pages:
7384
runs-on: 'ubuntu-latest'

0 commit comments

Comments
 (0)