Files
DeepTutor/.github/workflows/docs-surface.yml
AleFlyX 397b630f72 docs: add a deployment runbook and pre-commit checks (#3017)
* docs: document deployment and add maintenance checks

Add Cloudflare build, deployment, and rollback steps, check locale pairs and Markdown before commits, and report unused public asset candidates. Refs #2942.

* docs: add a Wrangler configuration example

部署手册说明如何从现有 Worker 补齐样板,并核对域名、路由和绑定。

验证:TOML 解析、文档源检查、6 项文档测试和变更文件的 pre-commit 检查通过。

* ci: check the live docs surface on public docs PRs

按路径筛选目标为 feat/public-docs 的 PR,程序或快照变更时校验真实 CLI/API,纯文案跳过运行时依赖。

验证:实测 CLI 与文案分流、命令改名时旧快照失败、重新导出后通过。6 项文档测试和变更文件的 pre-commit 检查通过。

* ci: add a local docs preflight and reuse the surface filters

新增本地检查入口和中文流程说明。允许主动刷新命令清单或构建站点,本地和 CI 共用路径规则,构建后单独校验产物链接。

验证:模拟 CLI 改名和纯文案改动,验证旧示例失败、修复后 6 项测试通过。正常构建通过,坏链接返回 1 并报告具体路径。变更文件的 pre-commit 检查通过。

* docs: keep the preflight instructions in the existing README

* docs: explain how to trigger the first fork preview
2026-12-01 07:46:32 -05:00

44 lines
1.2 KiB
YAML

name: Docs surface
on:
pull_request:
branches: [feat/public-docs]
types: [opened, synchronize, reopened, edited]
permissions:
contents: read
concurrency:
group: docs-surface-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check:
name: Check docs surface
runs-on: ubuntu-latest
steps:
# Compare the PR merge commit with its base parent, including changes from forks.
- uses: actions/checkout@v6
with:
fetch-depth: 2
persist-credentials: false
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
with:
token: ''
filters: .github/docs-surface-paths.json
- uses: actions/setup-python@v5
if: steps.changes.outputs.surface == 'true'
with:
python-version: "3.11"
cache: pip
cache-dependency-path: requirements/**/*.txt
- name: Compare the committed snapshot with the live CLI and API
if: steps.changes.outputs.surface == 'true'
run: |
python -m pip install -r requirements/full.txt -r requirements/partners.txt
python scripts/export_docs_surface.py --check