Skip to content

[Docs] Rebuild JSDoc site as a pure function of manifest + git tags#1553

Merged
minggangw merged 2 commits into
RobotWebTools:developfrom
minggangw:fix-1552
Jun 25, 2026
Merged

[Docs] Rebuild JSDoc site as a pure function of manifest + git tags#1553
minggangw merged 2 commits into
RobotWebTools:developfrom
minggangw:fix-1552

Conversation

@minggangw

@minggangw minggangw commented Jun 25, 2026

Copy link
Copy Markdown
Member

Replace the gh-pages branch cache with a stateless build so the published documentation site is fully reproducible from a curated manifest and the Git release tags. Every deploy rebuilds the complete site from scratch, so there is no branch state that can drift.

  • Add tools/jsdoc/published-versions.json: a curated manifest (30 versions) that is the single source of truth for which versions are published.
  • Rewrite tools/jsdoc/regenerate-published-docs.js as one linear build path: every manifest version is rebuilt from its Git release tag via git worktree + jsdoc (using the current template, so all versions render consistently), shared assets are hoisted to docs/_static, and the landing index is regenerated. Drop the gh-pages cache, prune/self-heal logic, the per-version asset copies, and all the old mode flags. Remaining flags: --out, --manifest (both now validate that a value follows the flag).
  • package.json: replace docs:gh-pages / docs:gh-pages:full with a single docs:publish script.
  • .github/workflows/deploy-docs.yml: set contents: read, remove the gh-pages fetch and write-back steps, run npm run docs:publish, and upload build/published-docs as the Pages artifact.
  • tools/jsdoc/README.md: document the stateless manifest + tags model and the new naming; drop the obsolete "Recovering a Dropped Version" section and redundant gh-pages references.

Fix: #1552

Copilot AI review requested due to automatic review settings June 25, 2026 05:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the JSDoc publishing pipeline to be fully reproducible (stateless) by rebuilding the entire GitHub Pages site from a curated versions manifest plus Git release tags, rather than relying on (and mutating) a cached gh-pages branch.

Changes:

  • Introduces tools/jsdoc/published-versions.json as the single source of truth for which versions are published.
  • Rewrites tools/jsdoc/regenerate-published-docs.js to always rebuild the full published docs tree from tags + current workspace (no gh-pages snapshot/cache logic).
  • Updates the Pages workflow and npm scripts to use the new docs:publish path and artifact directory.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/jsdoc/regenerate-published-docs.js Switches to manifest-driven stateless rebuild using git tags/worktrees and a new default output directory.
tools/jsdoc/README.md Updates docs to describe the manifest + tags model and new docs:publish command/flags.
tools/jsdoc/published-versions.json Adds curated list of versions to publish (manifest).
package.json Replaces docs:gh-pages* scripts with docs:publish.
.github/workflows/deploy-docs.yml Removes gh-pages fetch/write-back and uploads build/published-docs to Pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 42 to 46
options.outputRoot = path.resolve(argv[index + 1]);
index += 1;
} else if (arg === '--versions') {
options.versions = argv[index + 1]
.split(',')
.map((value) => value.trim())
.filter(Boolean);
} else if (arg === '--manifest') {
options.manifestPath = path.resolve(argv[index + 1]);
index += 1;
Comment thread tools/jsdoc/README.md Outdated
Comment on lines +35 to +37
- reads the published version set from `published-versions.json`
- rebuilds every listed version from its Git tag
- rebuilds the current workspace version from the working tree (always included)
@coveralls

coveralls commented Jun 25, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 91.103% (-0.04%) from 91.143% — minggangw:fix-1552 into RobotWebTools:develop

@minggangw minggangw merged commit a6af64d into RobotWebTools:develop Jun 25, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Rebuild JSDoc site as a pure function of manifest + git tags

3 participants