chore(ci): try to enable selector by fixing versions.json#39
Open
danceratopz wants to merge 13 commits intomainfrom
Open
chore(ci): try to enable selector by fixing versions.json#39danceratopz wants to merge 13 commits intomainfrom
danceratopz wants to merge 13 commits intomainfrom
Conversation
Material's built-in version selector (provider: mike) breaks for multi-depth branch paths because it extracts only the last URL segment and navigates via relative paths. Add a custom selector that uses absolute paths for both version matching and navigation. - scripts/version-selector.js: custom selector using Material's CSS classes, fetches /docs/versions.json and navigates to absolute URLs. - scripts/assemble-docs.py: post-staging assembly (inject selector, generate versions.json with url fields, generate redirect HTML). - scripts/local-assemble.py: local testing harness that stages artifacts and runs assembly, with optional --serve flag.
PR runs (pull_request event) succeed but don't produce artifacts. When a PR run is newer than the push run, gh run list picks it up and the download fails silently. Filter by --event push first, falling back to workflow_dispatch, so only artifact-producing runs are selected.
Replace three post-staging bash steps (mirror to /docs/ root, generate versions.json, copy versions.json to intermediate dirs) with a single call to scripts/assemble-docs.py. The script injects a custom version selector, generates versions.json with explicit url fields, and writes meta-refresh redirects at /docs/ and /docs/spec/ instead of mirroring.
Add experiments/publish-docs and experiments/publish-docs-test to BRANCH_CONFIG. Both have recent successful artifact builds, giving two deployed versions to test the version selector switching with. Set the default to experiments/publish-docs.
79b55bb to
2f9f8be
Compare
Push to main and repository_dispatch from execution-specs already cover the real triggers. A daily fallback mostly burns Actions minutes and can paper over a missed dispatch rather than surfacing it.
Stable permalink that tracks the current default branch so external links survive the rollover from e.g. forks/amsterdam to forks/bogota. /docs/ and /docs/spec/ forward through the permalink for backward compatibility. Spec redirect target updated to specs/reference/ to match the current branch layout.
/docs/ is now a Zensical-built landing page at docs/docs/index.md with a section for execution-specs linking to the Amsterdam fork docs. The old /docs/ and /docs/spec/ forwarders are removed since the site is not live; only the /docs/default/ permalink remains for stable cross-rollover links.
Stages artifacts under site/docs/execution-specs/<branch>/ and publishes URLs as /docs/execution-specs/<branch>/. The permalink moves to /docs/execution-specs/default/ so rollovers only rebind within the product. Done before the site goes live so no external links break. versions.json entries now carry the full /docs/ path-suffix in their version field, keeping version-selector.js unchanged. local-assemble.py grows a PRODUCT constant that mirrors the workflow env var.
Drops the /default/ segment — the product root itself redirects to the current default branch. Shorter URLs with no loss of function.
Drops the experiments/ test branches now that the real fork and devnet are ready. Default branch is forks/amsterdam.
Single source of truth for product, default_branch and branches[]. CI loads it via mikefarah yq (preinstalled on ubuntu-latest) into GITHUB_ENV; local-assemble.py loads it via pyyaml. Removes the two-place drift hazard between deploy.yml and local-assemble.py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix three issues with the docs aggregation pipeline.
runs -- which succeed but produce no artifacts -- are skipped.
supports multi-depth branch paths (e.g. forks/amsterdam, devnets/amsterdam/2).
Material's selector breaks because it extracts only the last URL segment
and navigates via relative paths.
meta-refresh redirect to /docs/forks/amsterdam/.
generate redirects) into scripts/assemble-docs.py, called by both the
workflow and a new local testing script (scripts/local-assemble.py).