docs: implement versioning system and enhance documentation structure

This commit is contained in:
ob-yalian
2026-04-24 15:48:54 +08:00
parent a487e67e1c
commit 91e1a978e8
14 changed files with 845 additions and 45 deletions
+4 -11
View File
@@ -4,6 +4,7 @@ on:
push:
branches:
- docs/format_optimization
- docs/version_optimization
- Document
- main
workflow_dispatch:
@@ -22,6 +23,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
@@ -35,17 +38,7 @@ jobs:
- name: Build multilingual HTML
run: |
# Build English
sphinx-build -b html docs/en docs/en/_build/html
# Build Chinese
sphinx-build -b html docs/zh docs/zh/_build/html
# Merge outputs to unified publish directory
mkdir -p site/en site/zh
cp -r docs/en/_build/html/. site/en/
cp -r docs/zh/_build/html/. site/zh/
# Root redirect to English (可根据需要改成 zh)
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
python docs/build_versions.py
- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v4