From cb85f24036560fcc98fb0181c51816ea4e48a3c9 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 11 Aug 2026 17:35:56 +0100 Subject: [PATCH] ci: build the docs from SUMMARY.md rather than by walking the directory `md-book -i . -o book` pointed at the docs root, which has no SUMMARY.md, so md-book fell back to walking the directory: 574 pages in path order, publishing archive/, artifacts/ and research notes alongside the real documentation. `md-book build .` reads book.toml, so it honours `src = "src"` and the 118-line SUMMARY.md: 59 pages, in the order the summary declares, with the part titles and the folding the config already asks for. Output still lands in docs/book, which is what the upload step expects. Also drops the `|| true`, which was hiding build failures behind a successful job and a stale artefact. Requires terraphim/md-book#27, which the workflow clones from main. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/deploy-docs.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 290ce2bf0..820820261 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -59,10 +59,15 @@ jobs: ls -la echo "DEBUG: Checking md-book binary:" ls -la /tmp/md-book/target/release/ || echo "md-book binary not found" - echo "DEBUG: Building with md-book fork..." + echo "Building with md-book (SUMMARY.md-driven)" rm -rf book/ - /tmp/md-book/target/release/md-book -i . -o book || true - echo "DEBUG: Build completed with exit code: $?" + # `build .` reads book.toml, so it honours `src` and the SUMMARY.md + # ordering. The old `-i . -o book` pointed at the docs root, which has + # no SUMMARY.md, so md-book fell back to walking the directory and + # published 574 pages — archives, research notes and artefacts + # included — in path order rather than the 59 the summary declares. + /tmp/md-book/target/release/md-book build . + echo "Pages built: $(find book -name '*.html' | wc -l)" - name: Upload build artifact uses: actions/upload-artifact@v5