Updated workflow
Build Sphinx Documentation / Build Documentation from PR Branch (pull_request) Successful in 2s

This commit is contained in:
2026-04-13 13:34:06 +08:00
parent 2147dc4082
commit c6f664085e
2 changed files with 99 additions and 60 deletions
+8 -7
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: linux
steps:
# 第一步设置主工作树和虚拟环境
# 第一步: 设置主工作树和虚拟环境
- name: Setup main worktree and virtual environment
run: |
echo "=== Setting up main worktree ==="
@@ -42,7 +42,7 @@ jobs:
echo "✓ Main worktree ready"
# 第二步为PR分支创建工作树
# 第二步: 为PR分支创建工作树
- name: Create worktree for PR branch
run: |
echo "=== Creating worktree for PR branch: ${{ github.head_ref }} ==="
@@ -63,7 +63,7 @@ jobs:
echo "✓ Worktree created at: /home/ly0kos/work/test_env/worktrees/${{ github.head_ref }}"
# 第三步复用共享虚拟环境并检查依赖更新
# 第三步: 复用共享虚拟环境并检查依赖更新
- name: Reuse shared virtual environment
run: |
echo "=== Reusing shared virtual environment ==="
@@ -92,7 +92,7 @@ jobs:
echo "python3: $(python3 --version)"
echo "Sphinx: $(sphinx-build --version 2>/dev/null || echo 'Not installed')"
# 第四步在工作树中构建文档
# 第四步: 在工作树中构建文档
- name: Build documentation in worktree
run: |
echo "=== Building documentation in worktree ==="
@@ -111,13 +111,13 @@ jobs:
echo "✓ Build completed for PR branch: ${{ github.head_ref }}"
# 第五步验证构建结果
# 第五步: 验证构建结果
- name: Verify build
run: |
echo "Build output for PR ${{ github.head_ref }}:"
ls -la /home/ly0kos/work/test_env/pr-builds/${{ github.head_ref }}/ | head -10
# 第六步复制至测试目录
# 第六步: 复制至测试目录
- name: Copy to dev folder
run: |
echo "Now clear dev folder"
@@ -125,4 +125,5 @@ jobs:
echo "Copy build to dev folder"
cp -r /home/ly0kos/work/test_env/pr-builds/${{ github.head_ref }}/* /var/www/docs_dev/
echo "✓ Documentation in DEV folder now!"
echo "Please check http://mkb.local:880 to Verify Changes"
echo "Please check http://mkb.local:880 to Verify Changes"