Fix the docs deploy that silently stopped publishing - #102
Merged
Conversation
The KaTeX and syntax-highlighting fix from 7f0219c never reached production. gh-pages is still on `build based on 8f843b7`, made two days before the fix, so examples.rxinfer.com is still serving the broken build - including the DocumenterMermaid `<script type="module">` that caused the outage in the first place. The cause is in 360c14d. Adding the "Check the built site renders" step moved the `env:` block carrying GITHUB_TOKEN off the step that runs `make docs` onto the new one. `deploydocs` runs inside `make docs`, so it lost its credentials - and with no credentials Documenter decides this is not a deploy build, logs `Deploying: ✘` and returns normally. Three green runs on main published nothing. Move the credentials back onto "Build documentation", and make the failure mode impossible to miss next time: on `refs/heads/main` or a tag, `docs/make.jl` now errors out when neither DOCUMENTER_KEY nor GITHUB_TOKEN is set, rather than letting a build that publishes nothing exit green. PR builds are unaffected. Also strip Documenter's `versions.js` script tag from the built pages. It is emitted relative to the site root on the assumption of a versioned deployment; we deploy unversioned at the domain root, so it resolves above the root and 404s on every page load. The version selector is already hidden without it. That 404 was the first line in the console on every page, which is exactly the noise you do not want when something real breaks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Keep the mechanism, drop the story. Comments explain how the failure works and what the guard does; git history and issues cover when it happened and to whom. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The site is stale, not broken
Yesterday's fix (#99,
7f0219c) was correct and is inmain. It just never shipped.gh-pagesis still on6a5ca87 2026-08-25 build based on 8f843b7— two days and several merges behind. So examples.rxinfer.com is still serving the pre-fix build, complete with the DocumenterMermaid<script type="module">that caused the original outage. That is why math and highlighting still break there, and why it comes and goes between reloads: require.js attributes mermaid's anonymousdefine()to whichever module happens to be in flight, so the victim is jQuery on one load,katex-auto-renderon the next, a mermaid chunk on the one after (Se.default.extend is not a function), and nobody on the one after that.Verified with headless Chromium against the live URL —
.katexelement count flips between14and0across identical loads.Why CI went green while publishing nothing
From the Documentation job of the last successful run (
32966705464):360c14dadded the "Check the built site renders" step and, in doing so, moved theenv:block carryingGITHUB_TOKENoff the step that runsmake docsonto the new one.deploydocsruns insidemake docs. With no credentials Documenter decides this is not a deploy build, logsDeploying: ✘, and returns normally — the job stays green.Changes
.github/workflows/CI.yml— credentials back on "Build documentation", wheredeploydocsactually runs. The render check needs neither the token nor the FastCholesky flag.docs/make.jl— onrefs/heads/mainor a tag, error out when neitherDOCUMENTER_KEYnorGITHUB_TOKENis set, instead of finishing green having published nothing. PR builds (refs/pull/N/merge) are unaffected, so forks keep working.docs/make.jl— strip Documenter'sversions.jsscript tag from the built HTML. It is emitted relative to the site root assuming a versioned deployment; we deploy unversioned at the domain root (versions=nothing), so from/categories/basic_examples/x/it resolves to../../../../versions.js, above the root, and 404s on every page load. The version selector is already hidden without it. This was the first line in the console on every page — noise that hides real errors.docs/src/how_build_works.md— a Deployment section documenting the silent-deploy hazard.Verification
After merge, confirm
git ls-remote origin gh-pagesadvances and the live page no longer containstype="module".🤖 Generated with Claude Code