4545 default : ' '
4646 type : string
4747
48- jobs :
48+ outputs :
49+ github_pages_url :
50+ description : " URL to GitHub Pages."
51+ value : ${{ jobs.PrepareGitHubPages.outputs.github_pages_url }}
4952
50- PublishToGitHubPages :
51- name : 📚 Publish to GH-Pages
53+ jobs :
54+ PrepareGitHubPages :
55+ name : 📖 Merge multiple contents for publishing
5256 runs-on : " ubuntu-${{ inputs.ubuntu_image_version }}"
53-
57+ permissions :
58+ pages : write # to deploy to Pages
59+ id-token : write # to verify the deployment originates from an appropriate source
60+ environment :
61+ name : github-pages
62+ url : ${{ steps.deployment.outputs.page_url }}
63+ outputs :
64+ github_pages_url : ${{ steps.deployment.outputs.page_url }}
5465 steps :
55- - name : ⏬ Checkout repository
56- uses : actions/checkout@v6
57-
5866 - name : 📥 Download artifacts '${{ inputs.doc }}' from 'SphinxDocumentation' job
5967 uses : pyTooling/download-artifact@v7
6068 with :
@@ -75,15 +83,13 @@ jobs:
7583 name : ${{ inputs.typing }}
7684 path : public/typing
7785
78- - name : ' 📓 Publish site to GitHub Pages'
86+ - name : 📑 Upload static files as artifact
87+ if : github.event_name != 'pull_request'
88+ uses : actions/upload-pages-artifact@v4
89+ with :
90+ path : public/
91+
92+ - name : 📖 Deploy to GitHub Pages
93+ id : deployment
7994 if : github.event_name != 'pull_request'
80- run : |
81- cd public
82- touch .nojekyll
83- git init
84- cp ../.git/config ./.git/config
85- git add .
86- git config --local user.email "BuildTheDocs@GitHubActions"
87- git config --local user.name "GitHub Actions"
88- git commit -a -m "update ${{ github.sha }}"
89- git push -u origin +HEAD:gh-pages
95+ uses : actions/deploy-pages@v4
0 commit comments