Skip to content

Versioned documentation: keep the public default on the latest stable release - #4

Open
Mmoncadaisla wants to merge 22 commits into
mainfrom
docs/versioned-docs
Open

Versioned documentation: keep the public default on the latest stable release#4
Mmoncadaisla wants to merge 22 commits into
mainfrom
docs/versioned-docs

Conversation

@Mmoncadaisla

@Mmoncadaisla Mmoncadaisla commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Why

Publishing the v0.4.0-rc.1 pre-release replaced the public docs site with unreleased content: the site deploys from main as a single version, and main now is the RC. Pre-release docs should be available, but the public default should stay on the latest stable release.

What

Docs are now versioned with the Zensical fork of mike. Each version lives in its own directory on a gh-pages branch, with a version selector on every page. Pages still publishes through the existing artifact flow, so the Pages source setting stays as it is.

Event Deploys to latest (public default)
Push to main dev/ unchanged
Pre-release published rolling rc/, titled with the tag unchanged
Stable release published X.Y/ moves here
Manual run any version, built from any tag only if requested

Safeguards worth knowing about:

  • latest never moves backward (a v0.3.4 after v0.4.0 won't repoint the site) and can never point at rc.
  • A -rc.N suffix in the tag routes to rc/ even if the pre-release checkbox was forgotten.
  • Rolling versions (dev, rc) are newest-wins under concurrent builds; stable releases deploy in publish order.
  • Release tags are validated before use, and the mike fork is pinned to a commit (it installs from a mutable branch in a job with contents: write).

After merging (one-time)

  1. Allow tag deploys: Settings → Environments → github-pages → deployment branches and tags → add tag rule v*. Today only main may deploy, which would reject release-triggered runs.
  2. Backfill the stable docs: Actions → "Build documentation" → Run workflow on main with ref v0.3.3, version 0.3, "latest" ticked.

Until step 2 runs, the old site stays live — the workflow refuses to publish a site that has no default version yet.

Notes

  • Docs deploy independently of the PyPI publish. If a release goes bad, CONTRIBUTING now documents how to move latest back and delete a version.
  • Verified locally end to end: version deploys, alias moves, root redirect, rc titling, idempotent re-runs, zensical build, and the unit suite.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56c9bb581b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread .github/workflows/docs.yml
Comment thread CONTRIBUTING.md Outdated
… tag uses that tag's workflow definition, which has no manual trigger.
…rough the workflow, since gh-pages pushes alone never reach Pages.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 973f0a5016

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docs.yml Outdated
Comment thread .github/workflows/docs.yml Outdated
Comment thread .github/workflows/docs.yml Outdated
…very push attempt; the resolve-time check could act on stale state when releases overlap.
…er build cannot overwrite dev/ or rc/ content.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8678e6ac8f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docs.yml Outdated
Comment thread .github/workflows/docs.yml

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1665abdc0f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docs.yml Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a320d4915a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docs.yml Outdated
Comment thread .github/workflows/docs.yml
Comment thread .github/workflows/docs.yml Outdated
…e checkbox, and inject the version provider when backfilling docs from pre-versioning tags.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 795fa4b73d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docs.yml Outdated
… confirmed-absent gh-pages branch may bypass the guard.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b872a67d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docs.yml Outdated
…hyphen in the tag; build metadata may contain hyphens.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8626b341f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docs.yml
Comment thread .github/workflows/docs.yml
… stale local branch replays the same non-fast-forward rejection.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf719da82f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

latest="false"
else
# v0.4.0 -> 0.4
version="$(echo "${RELEASE_TAG#v}" | cut -d. -f1,2)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent older patches from replacing a stable line

When an older patch release is published or republished after a newer patch in the same minor line—for example, v0.3.3 after v0.3.4—both tags collapse to the 0.3 target, so the later event overwrites 0.3/ with the older documentation and the latest guard sees equal line values and permits it. Unlike the prior overlap finding, this occurs even when the runs are fully sequential, so the concurrency group does not prevent it; preserve and compare the full release version before replacing an existing stable line.

Useful? React with 👍 / 👎.

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.

1 participant