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