docs: update GitHub Actions workflow to enhance permissions and improve deployment process for GitHub Pages

This commit is contained in:
ob-yalian
2026-04-24 16:15:17 +08:00
parent ca00143cdd
commit 452fecd6a6
+15 -6
View File
@@ -10,7 +10,9 @@ on:
workflow_dispatch:
permissions:
contents: write
contents: read
pages: write
id-token: write
concurrency:
group: gh-pages
@@ -40,9 +42,16 @@ jobs:
run: |
python docs/build_versions.py
- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: site
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4