@@ -8,6 +8,7 @@ name: Deploy
88
99# Explicitly declare permissions
1010permissions :
11+ actions : read
1112 contents : read
1213 pull-requests : write
1314 statuses : write
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@v4
@@ -48,18 +51,23 @@ jobs:
4851 # TODO pinata-jwt-token: ${{ secrets.PINATA_JWT_TOKEN }}
4952 github-token : ${{ github.token }}
5053
51- # TODO: right now, DNSLink is controlled by Fleek, and we use ipfs/ipfs-deploy-action for PR previews
52- # - name: Update DNSLink
53- # if: github.event.workflow_run.head_branch == 'main'
54- # uses: ipfs/dnslink-action@v0.1
55- # with:
56- # cid: ${{ steps.deploy.outputs.cid }}
57- # dnslink_domain: 'specs.ipfs.tech'
58- # cf_record_id: ${{ secrets.CF_RECORD_ID }}
59- # cf_zone_id: ${{ secrets.CF_ZONE_ID }}
60- # cf_auth_token: ${{ secrets.CF_AUTH_TOKEN }}
61- # github_token: ${{ github.token }}
62- # set_github_status: true
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://specs-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 : ' specs-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
6371
6472 deploy-gh-pages :
6573 if : |
0 commit comments