File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change 2
2
# This workflow has access to secrets but never executes untrusted code
3
3
# It only downloads and deploys pre-built artifacts from the build workflow
4
4
# Security: Fork code cannot access secrets as it only runs in build workflow
5
- # Deploys to IPFS for all branches
5
+ # Deploys to IPFS for all branches and GitHub Pages for main branch only
6
6
7
7
name : Deploy
8
8
51
51
storacha-proof : ${{ secrets.STORACHA_PROOF }}
52
52
github-token : ${{ github.token }}
53
53
retention-count : 10
54
- retention-days : 30
54
+ retention-days : 30
55
+
56
+ deploy-gh-pages :
57
+ if : |
58
+ github.event.workflow_run.conclusion == 'success' &&
59
+ github.event.workflow_run.head_branch == 'main'
60
+ runs-on : ubuntu-latest
61
+ permissions :
62
+ pages : write
63
+ id-token : write
64
+ environment :
65
+ name : github-pages
66
+ url : ${{ steps.deployment.outputs.page_url }}
67
+ steps :
68
+ - name : Download build artifact
69
+ uses : actions/download-artifact@v4
70
+ with :
71
+ name : docs-build-${{ github.event.workflow_run.id }}
72
+ path : docs-build
73
+ run-id : ${{ github.event.workflow_run.id }}
74
+ github-token : ${{ github.token }}
75
+
76
+ - name : Upload Pages artifact
77
+ uses : actions/upload-pages-artifact@v3
78
+ with :
79
+ path : docs-build
80
+
81
+ - name : Deploy to GitHub Pages
82
+ id : deployment
83
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments