Deployment & Docs Authoring Workflow¶
Annolid publishes multiple documentation surfaces from this repository and ships a local workflow so contributors can edit website/ and docs/ side-by-side with live reload, strict link/asset validation, and reproducible showcase generation.
Source-of-Truth Layout¶
website/: landing page (index.html) and landing assets (website/assets/→ published as/website-assets/)docs/: canonical MkDocs Material source for/portal/and mirrored root compatibility routesdocs/imgs/showcase/: generated screenshots, animated tracking demos, and offline 3D simulation capturesdocs/assets/reports/: self-contained interactive example artifacts (such asmouse083_report.html)docs/tutorials/: worked walkthroughs, focused markdown guides, and Jupyter notebooksscripts/site_workflow.py: unified local staging, live preview/watch server, and strict site validatorscripts/generate_docs_showcase.py: reproducible generator for video/tracking showcase visuals, simulation screenshots, and live HTML5 reports
Fast Local Authoring Workflow¶
1. Preview Website + Docs Portal Together¶
Because website/index.html references /website-assets/... and /portal/... (matching production annolid.com), use the combined staging preview instead of opening website/index.html directly from disk:
# Stage combined landing page + /portal/ into .site_preview/ and serve at http://127.0.0.1:8080/
make site-preview
# Same preview with automatic live rebuild when website/, docs/, or mkdocs.yml changes
make site-watch
You can also invoke the underlying Python tool directly with custom options:
.venv/bin/python scripts/site_workflow.py preview --watch --port 8080 --open
- Editing
website/syncs instantaneously without waiting for MkDocs. - Editing
docs/ormkdocs.ymltriggers an automatic MkDocs rebuild and re-stage. .site_preview/is gitignored so local preview artifacts never pollute commits.
2. Validate Before Committing¶
Run one command to validate website/, docs/, and book/ locally:
make site-check
# Or validate only the Jupyter Book (`book/`) surface:
make book-check
scripts/site_workflow.py check verifies:
- required source files exist (
website/index.html,docs/index.md,mkdocs.yml,docs/requirements_mkdocs.txt), - the production CI title contract in
website/index.html(Annolid | Research-Grade Animal Behavior AI) is preserved, - every
website-assets/...reference resolves inwebsite/assets/, - every
/portal/...link inwebsite/index.htmlresolves inside the built MkDocs output, - every local image reference across published Markdown docs exists on disk,
mkdocs build --strict --cleansucceeds with zero warnings/errors,- no machine-local absolute paths leaked into
docs/,website/,book/, or generated HTML examples, - Jupyter Book (
book/)_config.yml,_toc.yml, chapter headings, local relative links, and self-contained images resolve insidebook/, and - showcase, website, and book assets stay within size budgets (below the pre-commit 6 MB limit).
3. Regenerate Showcase Screenshots, Animations & Simulation Captures¶
Regenerate offline 3D simulation screenshots (Two-Mouse, 13-Keypoint Pose, Fly-Brain LIF Connectome, FlyBody 3D) and sync them into website/assets/images/showcase/:
make showcase-sims
Regenerate video tracking visuals, animated tracking GIF, behavior storyboard, ethogram/kinematics dashboard, zone analysis chart, offscreen GUI screenshot, and sanitized live HTML5 report from any Annolid-tracked video:
make showcase-video VIDEO=/path/to/your_tracked_video.mp4
Both targets wrap scripts/generate_docs_showcase.py, which automatically syncs shared showcase assets from docs/imgs/showcase/ into website/assets/images/showcase/ so the website and docs portal stay visually aligned.
Published Targets¶
/: landing page fromwebsite/(website/assets/mounted at/website-assets/)/portal/: canonical MkDocs Material documentation portal- root docs routes such as
/installation/,/workflows/, and/reference/for backward compatibility /book/: notebook-oriented Jupyter Book surface published separately
GitHub Actions Pipelines¶
docs-quality.yml: builds MkDocs in strict mode and runs markdownlint across primary docs pages.docs-pages.yml: builds MkDocs and uploads the HTML artifact for review/validation.healthonrails-site-sync.yml: syncs landing page,/portal/, root compatibility routes, legacy redirects, and/book/tohealthonrails/healthonrails.github.ioonmain.book-pages.yml: builds the Jupyter Book surface.CI.yml: runs repository-wide tests and validation checks.
Deployment Principles¶
- Keep
docs/as the canonical user-facing documentation source. - Always run
make site-check(ormkdocs build --strict --clean --config-file mkdocs.yml) before merging. - Keep publication reproducible and debuggable with ephemeral local staging (
.site_preview/). - Preserve compatibility routes and legacy redirect stubs (
scripts/write_legacy_redirects.sh). - Never commit machine-local absolute paths into docs, HTML examples, or scripts.