route-forge 系列的文档聚合站,发布在 https://route-forge.github.io/docs/。
- 源文档的唯一事实源在各源仓库:
route-forge(前端)与php-laravel、php-common的.docs/、README。改文档请去源仓库改,不要在本仓手写任何文档内容。 - 本仓只包含构建脚本(
build.mjs)、部署 workflow(.github/workflows/deploy.yml)和站内模板。构建时从各源仓库浅克隆最新 main 渲染为静态 HTML。 - 触发方式:本仓 push /
workflow_dispatch/ 源仓库发repository_dispatch(类型docs-sync)/ 每日定时兜底。 - 增删源文档:改
build.mjs的SOURCES清单;增删源仓库:build.mjs的SOURCES与deploy.yml的克隆清单两处同步改。 - 源文件缺失时构建故意失败(红),以便及时发现源仓库结构变化,不做静默丢页。
mkdir -p sources
for repo in route-forge/route-forge route-forge/php-laravel route-forge/php-common; do
git clone --depth 1 "https://github.com/${repo}.git" "sources/$(basename "${repo}")"
done
npm install && npm run build # 产物在 dist/,任意静态服务器可看源仓库发版流水线可加一步 gh api repos/route-forge/docs/dispatches -f event_type=docs-sync,把每日定时兜底变成发布即刷新(两包尚未发版,暂缓)。