Skip to content

Commit e569a6e

Browse files
committed
chore(ci): add dnslink-action for IPFS hosting
- add DNSLink update via ipshipyard/dnslink-action@v1 - switch to ipshipyard/ipfs-deploy-action@v1 - remove debug step Related: ipshipyard/waterworks-community#23
1 parent be4fa47 commit e569a6e

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ name: Deploy
88

99
# Explicitly declare permissions
1010
permissions:
11+
actions: read
1112
contents: read
1213
pull-requests: write
1314
statuses: write
@@ -26,6 +27,8 @@ jobs:
2627
runs-on: ubuntu-latest
2728
outputs:
2829
cid: ${{ steps.deploy.outputs.cid }}
30+
environment:
31+
name: 'ipfs-publish'
2932
steps:
3033
- name: Download build artifact
3134
uses: actions/download-artifact@v5
@@ -35,15 +38,8 @@ jobs:
3538
run-id: ${{ github.event.workflow_run.id }}
3639
github-token: ${{ github.token }}
3740

38-
- name: Debug PR context and SHA
39-
run: |
40-
echo "Event: ${{ github.event_name }}"
41-
echo "SHA: ${{ github.sha }}"
42-
echo "Head SHA: ${{ github.event.pull_request.head.sha }}"
43-
echo "workflow_run.head_sha: ${{ github.event.workflow_run.head_sha }}"
44-
4541
- name: Deploy to IPFS
46-
uses: ipfs/ipfs-deploy-action@v1
42+
uses: ipshipyard/ipfs-deploy-action@v1
4743
id: deploy
4844
with:
4945
path-to-deploy: ${{ env.BUILD_PATH }}
@@ -55,6 +51,24 @@ jobs:
5551
#storacha-proof: ${{ secrets.STORACHA_PROOF }}
5652
github-token: ${{ github.token }}
5753

54+
dnslink-update:
55+
runs-on: ubuntu-latest
56+
needs: deploy-ipfs
57+
if: github.event.workflow_run.head_branch == 'main'
58+
environment:
59+
name: 'cf-dnslink'
60+
url: "https://docs-ipfs-tech.ipns.inbrowser.link/"
61+
steps:
62+
- name: Update DNSLink
63+
uses: ipshipyard/dnslink-action@v1
64+
with:
65+
cid: ${{ needs.deploy-ipfs.outputs.cid }}
66+
dnslink_domain: 'docs-ipfs-tech.dnslinks.ipshipyard.tech'
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
71+
5872
deploy-gh-pages:
5973
if: |
6074
github.event.workflow_run.conclusion == 'success' &&

0 commit comments

Comments
 (0)