Skip to content

docs: add a Zensical documentation site harness - #2517

Merged
mykola-mokhnach merged 3 commits into
masterfrom
docs/mkdocs-harness
Dec 4, 2026
Merged

mykola-mokhnach merged 3 commits into
masterfrom
docs/mkdocs-harness

Conversation

@mykola-mokhnach

@mykola-mokhnach mykola-mokhnach commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Phase 1 of the documentation plan: a build harness for a versioned docs site, with the existing docs/ pages moved into a nav as-is (no renames, no rewriting yet), and the publishing connected to the release workflow from #2515.

What's here

  • mkdocs.yml: Zensical config (the MkDocs format it reads) with the nav over the current pages, plus docs/index.md.
  • gradle/docs.gradle: docsServe, docsBuild, docsCheck (strict), docsDeploy and docsSetDefault. Everything runs through uv from docs/requirements.txt, so there is no venv to manage; the tasks are not part of build/check.
  • .github/workflows/docs.yml: strict check on PRs touching the docs; deploys only from master (serialized, one at a time).
  • Broken links found by the strict build are fixed (repo-relative ../src/... links became absolute GitHub URLs, dead AndroidBy/AndroidFindBy links, a wrong anchor).
  • Authoring notes in docs/Note-for-developers.md, release/docs steps in docs/release.md.

Publishing

  • Release: release.yml gets a docs job that runs after a real (non-dry-run) release, i.e. after the tag is pushed and the artifacts are published. It builds the docs from the release tag and publishes <major>.<minor> with the latest alias, then points the site root at latest. If only this job fails, "Re-run failed jobs" repeats it.
  • dev: a push to master that touches docs/**, mkdocs.yml or the docs tooling publishes the dev version.
  • Both go through the same reusable docs.yml (workflow_call), so there is one deploy path.

Decisions

  • Zensical instead of Material for MkDocs, which reaches end of life on 2027-05-05. Zensical is 0.x, so versions are pinned exactly.
  • Versioning uses the Zensical-compatible fork of mike (tag 2.2.0+zensical-0.1.0, pinned by commit). Zensical documents it as transitional until native versioning exists.
  • Publishing branch: deploys go to a new docs-site branch. The existing gh-pages branch (2018 Javadoc of 6.1.0, currently served at the site root) is left untouched.

After merging

  1. The first dev deploy (or Actions > Docs > Run workflow with dev) creates the docs-site branch.
  2. A maintainer switches the repository's Pages source to docs-site (Settings > Pages). The old 6.1 Javadoc URLs stop resolving then.
  3. The site root has no page until the first release publishes latest (or run ./gradlew docsDeploy -PdocsVersion=dev -PdocsAlias=latest followed by ./gradlew docsSetDefault).

Testing

  • ./gradlew docsCheck passes locally (strict build; an added broken link makes it fail), and in CI (check).
  • docsDeploy and docsSetDefault were run locally against a scratch branch (no push): the expected versions.json and a root redirect to latest/.
  • The deploy job and the docs job in release.yml cannot run before the merge; they have only been validated as YAML.

@eglitise

eglitise commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Interesting. I was also considering eventually migrating @appium/docutils to Zensical, though their custom mike fork gave me pause. Last I checked, there were some other minor missing things, like the revision date plugin.

Do you think it would be worth migrating only this client, or instead updating @appium/docutils and adopting it here?

@mykola-mokhnach

mykola-mokhnach commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Interesting. I was also considering eventually migrating @appium/docutils to Zensical, though their custom mike fork gave me pause. Last I checked, there were some other minor missing things, like the revision date plugin.

Do you think it would be worth migrating only this client, or instead updating @appium/docutils and adopting it here?

I would prefer to do it step by step. Lets finish this implementation to see how it is going to look like, and then switch the appium's one once we are happy with the result.

Build the existing docs/ pages into a site with Zensical, run through uv:
- mkdocs.yml (nav over the current pages, no renames yet) and docs/index.md
- Gradle tasks docsServe, docsBuild, docsCheck (strict) and docsDeploy (mike fork)
- docs.yml workflow: strict check on PRs, manual deploy from master
- fix repo-relative and dead links that the strict build flags
- docs authoring notes in Note-for-developers.md

Deploys go to a new docs-site branch so the legacy gh-pages content is left
untouched.
- release.yml: a docs job after a real release publishes <major>.<minor> as
  latest, built from the release tag
- docs.yml: reusable (workflow_call); pushes to master that touch the docs
  publish dev; deploys are serialized and only run from master
- release.md: document the docs step and how to retry it
@mykola-mokhnach
mykola-mokhnach marked this pull request as ready for review December 4, 2026 06:17
@mykola-mokhnach
mykola-mokhnach merged commit d704f5a into master Dec 4, 2026
15 checks passed
@mykola-mokhnach
mykola-mokhnach deleted the docs/mkdocs-harness branch December 4, 2026 06:34
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.

2 participants