1- name : Build and Deploy
1+ name : Build
22
33# Explicitly declare permissions
44permissions :
1414 branches :
1515 - main
1616 - workflow-run
17- workflow_run :
18- workflows :
19- - Build and Deploy
20- types :
21- - completed
2217
2318env :
2419 BUILD_PATH : ' out'
@@ -29,7 +24,6 @@ concurrency:
2924
3025jobs :
3126 build :
32- if : github.event_name == 'push' || github.event_name == 'pull_request'
3327 runs-on : ubuntu-latest
3428 steps :
3529 - name : Checkout code
5448 name : github-pages
5549 path : ${{ env.BUILD_PATH }}
5650
57- deploy :
58- if : ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
59- runs-on : ubuntu-latest
60- needs : build
61- outputs :
62- cid : ${{ steps.deploy.outputs.cid }}
63- steps :
64- - uses : actions/download-artifact@v4
65- with :
66- name : github-pages
67- path : ${{ env.BUILD_PATH }}
68- run-id : ${{ github.event.workflow_run.id }}
69-
70- - uses : ipfs/ipfs-deploy-action@v1
71- name : Deploy to IPFS Mirror Providers
72- id : deploy
73- with :
74- path-to-deploy : ${{ env.BUILD_PATH }}
75- cluster-url : " /dnsaddr/ipfs-websites.collab.ipfscluster.io"
76- cluster-user : ${{ secrets.CLUSTER_USER }}
77- cluster-password : ${{ secrets.CLUSTER_PASSWORD }}
78- storacha-key : ${{ secrets.STORACHA_KEY }}
79- storacha-proof : ${{ secrets.STORACHA_PROOF }}
80- # TODO pinata-jwt-token: ${{ secrets.PINATA_JWT_TOKEN }}
81- github-token : ${{ github.token }}
82-
83- # TODO: right now, DNSLink is controlled by Fleek, and we use ipfs/ipfs-deploy-action for PR previews
84- # - name: Update DNSLink
85- # if: false # TODO github.ref == 'refs/heads/main' # only update DNSLink for main branch
86- # uses: ipfs/dnslink-action@v0.1
87- # with:
88- # cid: ${{ steps.deploy.outputs.cid }}
89- # dnslink_domain: 'specs.ipfs.tech'
90- # cf_record_id: ${{ secrets.CF_RECORD_ID }}
91- # cf_zone_id: ${{ secrets.CF_ZONE_ID }}
92- # cf_auth_token: ${{ secrets.CF_AUTH_TOKEN }}
93- # github_token: ${{ github.token }}
94- # set_github_status: true
95-
96-
9751 gh-pages :
9852 if : github.event_name == 'push' && github.ref == 'refs/heads/main' # only deploy to gh-pages on push to the main branch
9953 runs-on : ' ubuntu-latest'
0 commit comments