File tree Expand file tree Collapse file tree 2 files changed +31
-94
lines changed
Expand file tree Collapse file tree 2 files changed +31
-94
lines changed Original file line number Diff line number Diff line change 88
99jobs :
1010 doxygen :
11-
1211 runs-on : ubuntu-24.04
1312
1413 steps :
@@ -59,17 +58,40 @@ jobs:
5958 env :
6059 GH_TOKEN : ${{ secrets.github_token }}
6160
62- - name : Update gh-pages
61+ - name : Prepare HTML for GitHub Pages
6362 if : github.ref == 'refs/heads/main'
6463 run : |
6564 tar -zxf artifacts/ITKDoxygen-*.tar.gz
6665 touch html/.nojekyll
67- git update-ref refs/heads/${TARGET_BRANCH} origin/${TARGET_BRANCH}
68- ./update-gh-pages.sh html
69- repo_uri="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
70- git push $repo_uri ${TARGET_BRANCH}
71- env :
72- GITHUB_TOKEN : ${{ secrets.github_token }}
73- TARGET_BRANCH : ' gh-pages'
66+
67+ - name : Upload Pages artifact
68+ if : github.ref == 'refs/heads/main'
69+ uses : actions/upload-pages-artifact@v3
70+ with :
71+ path : html
72+ retention-days : 7
73+
74+ deploy-gh-pages :
75+ needs : doxygen
76+ runs-on : ubuntu-24.04
77+
78+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
79+ permissions :
80+ contents : read
81+ pages : write # to deploy to Pages
82+ id-token : write # to verify the deployment originates from an appropriate source
83+
84+ # Deploy to the github-pages environment
85+ environment :
86+ name : github-pages
87+ url : ${{ steps.deployment.outputs.page_url }}
88+
89+ steps :
90+ - name : Deploy to GitHub Pages
91+ if : github.ref == 'refs/heads/main'
92+ id : deployment
93+ uses : actions/deploy-pages@v4
94+ # with:
95+ # preview: true <-> currently not available to the public
7496
7597
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments