Skip to content

Add versioned docs via separate flygym-docs repo - #300

Open
sibocw wants to merge 4 commits into
dev-v2.1.1from
multiversion-docs
Open

Add versioned docs via separate flygym-docs repo#300
sibocw wants to merge 4 commits into
dev-v2.1.1from
multiversion-docs

Conversation

@sibocw

@sibocw sibocw commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Implements the plan from #299.

Changes

  • pyproject.toml / uv.lock: add mike>=2.0 to dev deps (mike 2.2.0 resolved)
  • properdocs.yml: enable the MkDocs Material version-switcher (extra.version.provider: mike)
  • scripts/dev/push_doc_site.sh: replaces the manual git-init/force-push block with mike deploy

New deploy flow

push_doc_site.sh now:

  1. Reads the version from pyproject.toml automatically
  2. Prompts to confirm or override the label (e.g. type 2.1.1 (dev) for a pre-release preview)
  3. Prompts whether to update the latest alias (answer n for dev deploys)
  4. Ensures a flygym-docs remote exists in the local repo, adding it if not
  5. Runs mike deploy --push --remote flygym-docs -f properdocs.yml ...

mike calls the mkdocs entry point internally; properdocs registers itself as both mkdocs and properdocs in the venv, so no compatibility shim is needed.

One-time setup still required

Before this script can be used:

  1. Create NeLy-EPFL/flygym-docs, enable GitHub Pages on it
  2. Move the CNAME (neuromechfly.org) file to the new repo
  3. After the first successful deploy, run once: uv run mike set-default --push --remote flygym-docs latest

Test plan

  • Create NeLy-EPFL/flygym-docs and enable GitHub Pages
  • Run push_doc_site.sh for a dev label (2.1.1 (dev)), answer n to latest alias — verify versioned subdirectory appears on the docs repo
  • Run again for 2.1.1, answer y to latest — verify version switcher shows both entries and / redirects to 2.1.1

🤖 Generated with Claude Code

- Add mike>=2.0 to dev deps for versioned gh-pages deploys
- Enable the MkDocs Material version-switcher (extra.version.provider: mike)
- Rewrite push_doc_site.sh: reads version from pyproject.toml, prompts to
  confirm or override the label (e.g. "2.1.1 (dev)"), and asks whether to
  update the 'latest' alias; replaces the manual git-init/force-push block
  with mike deploy targeting the NeLy-EPFL/flygym-docs remote

Closes #299

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sibocw sibocw added documentation Improvements or additions to documentation help wanted housekeeping labels Jun 29, 2026
@sibocw sibocw added this to the v2.1.1 milestone Jun 29, 2026
@sibocw
sibocw changed the base branch from main to dev-v2.1.1 June 29, 2026 22:30
sibocw and others added 3 commits June 30, 2026 00:46
mike's -f flag is unrecognized; the correct short form for
--config-file is -F.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation help wanted housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant