Conversation
mkdocs.yml already declared extra.version.provider: mike (enabling the mkdocs-material version selector), but nothing actually deployed versioned docs: mike wasn't installed anywhere, and the release workflow ran a plain `mkdocs gh-deploy --force`, which overwrites the whole gh-pages branch with a single, unversioned build every release. - Add mike to the docs dependencies. - Replace the gh-deploy step with `mike deploy --push --update-aliases <major.minor> latest` followed by `mike set-default --push latest`, deriving <major.minor> from the release tag (v0.1.2 -> 0.1). This keeps one doc set per minor version, aliased to "latest" for the newest. - Configure the git identity mike needs to commit to gh-pages, and explicitly fetch the gh-pages branch first (a full checkout of the triggering ref doesn't include other branches, and mike's own docs call this out as a common CI gotcha). Also fixes a pre-existing, unrelated break in the same workflow: `pip install .[docs]` needs a [project.optional-dependencies] table, but `docs` was only defined under [dependency-groups] (PEP 735, likely for local `uv` use). That mismatch meant the deploy job's install step silently installed no docs dependencies at all - not even mkdocs itself - and gh-deploy could only have been working if these steps were always failing further down without anyone noticing (no non-main workflow exercises this path). Added the matching [project.optional-dependencies] docs table so `.[docs]` actually resolves; left the [dependency-groups] entry as-is for any uv-based local dev flow. Fixes TUDelftGeodesy#122
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.
Fixes #122.
mkdocs.ymlalready declaredextra.version.provider: mike(which enables the mkdocs-material version selector), but nothing actually deployed versioned docs:mikewasn't installed anywhere, and the release workflow ran a plainmkdocs gh-deploy --force, which overwrites the wholegh-pagesbranch with a single, unversioned build every release.What this does:
miketo the docs dependencies.gh-deploystep withmike deploy --push --update-aliases <major.minor> latestfollowed bymike set-default --push latest, deriving<major.minor>from the release tag (v0.1.2→0.1). One doc set per minor version, aliased tolatestfor the newest.mikeneeds to commit togh-pages, and explicitly fetches thegh-pagesbranch first (a checkout of the triggering ref doesn't include other branches —mike's own docs flag this as a common CI gotcha).Also fixes a pre-existing, unrelated break in the same workflow:
pip install .[docs]needs a[project.optional-dependencies]table, butdocswas only defined under[dependency-groups](PEP 735, likely for localuvuse). That mismatch meant the deploy job's install step silently installed no docs dependencies — not evenmkdocsitself. Added the matching[project.optional-dependencies]table so.[docs]actually resolves; left the[dependency-groups]entry as-is for anyuv-based local dev flow.Testing: validated
pyproject.toml(TOML parse) anddoc_deploy.yml(YAML parse + ruff clean on the repo). This workflow only runs onrelease: published, so it can't be exercised in CI on the PR itself — happy to walk through the exactmikecommands with a maintainer if useful.