Deploying Documentation to GitHub Pages¶
The documentation is built with MkDocs and the Material theme, and is automatically deployed to GitHub Pages when changes are pushed to the main branch.
Automatic Deployment¶
The workflow (.github/workflows/docs.yml, "Deploy Documentation") runs on every push to main that touches:
docs/**mkdocs.yml.readthedocs.yml.github/workflows/docs.yml
It:
- Sets up Python 3.11 and installs
docs/requirements.txt - Builds the site with
mkdocs build(output in./site) - Deploys it to GitHub Pages
- Makes it available at: https://luksgrin.xyz/CytoFlow.rs/
Manual Deployment¶
To manually trigger a deployment:
- Go to the Actions tab in GitHub
- Select the "Deploy Documentation" workflow
- Click "Run workflow"
- Select the
mainbranch and click "Run workflow"
Enabling GitHub Pages¶
GitHub Pages is already enabled for this repository. If it ever needs to be set up again:
- Go to repository Settings
- Navigate to Pages
- Under "Source", select "GitHub Actions"
- The workflow will handle the rest
Local Preview¶
To preview documentation locally before deploying:
# Create a virtual environment (optional, recommended)
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r docs/requirements.txt
# Serve locally with live reload
mkdocs serve
# Build the static site, failing on any warning (broken links, missing pages)
mkdocs build --strict
The documentation will be available at http://127.0.0.1:8000/CytoFlow.rs/.
Please run mkdocs build --strict before opening a pull request that changes the documentation: it must finish without warnings.
Writing Documentation¶
- Pages live in
docs/; the navigation is defined bynav:inmkdocs.yml. A new page must be added there - Screenshots go in
docs/img/(PNG, under 400 KB each). The current ones were captured from the browser preview (npm run dev, synthetic data) - Link between pages with relative
.mdpaths (e.g.[Gating](usage/gating.md#gate-tools)) so that MkDocs can check them - Keyboard keys use the
++key++syntax (pymdownx.keys), notes use admonitions (!!! note) docs/ipc.mdis the frontend ⇄ backend contract and is maintained together with the code
Custom Domain¶
The site is served under the custom domain of the owner's GitHub Pages user site (luksgrin.xyz), so this project's pages appear at https://luksgrin.xyz/CytoFlow.rs/ without a CNAME file in this repository. site_url in mkdocs.yml must stay in sync with that address.
To use a dedicated domain instead:
- Add a
CNAMEfile in thedocs/directory with your domain - Update
site_urlinmkdocs.yml - Configure DNS settings for your domain
Read the Docs¶
A .readthedocs.yml is also provided (Ubuntu 22.04, Python 3.11, mkdocs.yml, PDF and ePub formats) in case the documentation is also published on Read the Docs. GitHub Pages is the canonical location.