Documentation
This directory (under apps/docs) contains the documentation for the BitonicAI projects, built with MkDocs and mkdocstrings.
Building the Documentation
Prerequisites
Install the documentation dependencies (from the workspace root):
Build
Build the static site:
The output will be in apps/docs/site/.
Serve Locally
Serve the documentation locally for development:
The documentation will be available at http://localhost:8000
Documentation Structure
index.md- Main documentation homepageat_scorer/- ATS Scorer package documentationbitonicai/- BitonicAI service documentation
Adding Documentation
Adding New API Reference Pages
- Create a new markdown file in the appropriate directory
- Use the
module.pathsyntax to include docstrings:
- Add the page to
mkdocs.ymlin thenavsection
Writing Guide Pages
Create markdown files with standard Markdown syntax. Use code blocks with language tags for examples.
Updating Documentation
Documentation is automatically generated from docstrings in the source code. To update:
- Update docstrings in the source code
- Rebuild the documentation:
mkdocs build - Preview changes:
mkdocs serve
Docker Build
Build and serve documentation using Docker:
# Build the documentation image
docker build -f apps/docs/Dockerfile.docs -t bitonicai-docs .
# Run locally
docker run -p 8080:80 bitonicai-docs
Or use the helper script:
Visit http://localhost:8080 to view the documentation.
The Docker build: - Uses a multi-stage build (builder + nginx) - Installs all documentation dependencies - Builds the static site - Serves with nginx in production
Deployment
GitHub Pages
Prerequisites
- Ensure your repository is on GitHub
- Dependencies are managed with
uv(no pip). Run:
Automatic Deployment
The easiest way to deploy to GitHub Pages is using the gh-deploy command:
This command will:
1. Build the documentation
2. Create a gh-pages branch (if it doesn't exist)
3. Commit the built site to the gh-pages branch
4. Push to GitHub
Manual Deployment
If you prefer more control:
# Build the site
uv run --project apps/docs mkdocs build
# Create or checkout gh-pages branch
git checkout --orphan gh-pages
git rm -rf .
# Copy built site
cp -r site/* .
# Commit and push
git add .
git commit -m "Deploy documentation"
git push origin gh-pages
# Return to main branch
git checkout main
GitHub Actions (Recommended)
Create .github/workflows/docs.yml (already present):
name: Deploy Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'packages/**'
- 'apps/**'
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync --frozen --no-dev --package docs
- name: Build documentation
working-directory: apps/docs
run: uv run mkdocs build --strict
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apps/docs/site
Configure GitHub Pages
- Go to your repository Settings
- Navigate to Pages
- Under "Source", select "Deploy from a branch"
- Select
gh-pagesbranch and/ (root)folder - Click Save
Your documentation will be available at:
https://<username>.github.io/<repository-name>/
Docker Deployment
Build and run the documentation container:
# Build docs image
docker build -f apps/docs/Dockerfile.docs -t bitonicai-docs .
# Run locally
docker run -p 8080:80 bitonicai-docs
# Visit http://localhost:8080
Other Platforms
- Netlify: Build command
uv sync --package docs && uv run --project apps/docs mkdocs build, publishapps/docs/site/ - Read the Docs: Configure via
.readthedocs.yml - Vercel: Build command
uv sync --package docs && uv run --project apps/docs mkdocs build