docs: update GitHub Actions workflow for documentation deployment

This commit is contained in:
ob-yalian
2026-04-08 16:22:39 +08:00
parent b7326a12e0
commit 8888695c4c
+7 -22
View File
@@ -9,12 +9,10 @@ on:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
contents: write
concurrency:
group: pages
group: gh-pages
cancel-in-progress: true
jobs:
@@ -35,9 +33,6 @@ jobs:
python -m pip install --upgrade pip
pip install -r docs/en/requirements.txt -r docs/zh/requirements.txt jieba
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Build multilingual HTML
run: |
# Build English
@@ -52,19 +47,9 @@ jobs:
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=en/index.html"></head><body>Redirecting...</body></html>' > site/index.html
touch site/.nojekyll
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: site