This directory contains the documentation for the MaaS (Models-as-a-Service) Platform. Documentation is built automatically using GitHub Actions and versioned with mike.
This project uses mike to maintain versioned documentation:
latest: Always points to the most recent tagged release (default version, visible in dropdown)dev: Development version from the main branch (hidden from version selector, accessible at/dev/)v*.*.*: Specific version tags (e.g., v1.0.0, v1.2.3, visible in dropdown)
When a new version tag is pushed (e.g., v1.0.0), the docs are automatically:
- Deployed with that version number
- Tagged as
latest - Set as the default version
Note: The dev version is intentionally hidden from the version dropdown to avoid confusion for end users. Developers can access it directly at https://opendatahub-io.github.io/models-as-a-service/dev/
The documentation is styled using the Material for MkDocs theme.
Admonitions are styled using the !!! note syntax, more info here.
To build and preview the documentation website locally, follow these steps:
- Python 3.11 or higher
- pip (Python package manager)
- Install MkDocs and required plugins:
pip install -r requirements.txtOr install individually:
pip install mkdocs
pip install mkdocs-material
pip install mkdocs-git-revision-date-localized-plugin
pip install mike- Navigate to the docs directory (where
mkdocs.ymlis located):
cd /path/to/models-as-a-service/docs- Start the development server:
mkdocs serve- Open your browser and navigate to
http://127.0.0.1:8000
The documentation will automatically reload when you make changes to the source files.
To build the static site files:
mkdocs buildThis will create a site/ directory with the generated HTML files.
The documentation is configured using mkdocs.yml in this directory. This file contains:
- Site metadata and navigation
- Theme configuration (Material Design with Red Hat branding)
- Markdown extensions and plugins
- Build settings
index.md- Homepage*.md- Individual documentation pagesmkdocs.yml- MkDocs configurationassets/- Images and other static assets
When adding new documentation:
- Create or edit Markdown files in this directory
- Update the navigation in
mkdocs.ymlif adding new pages - Test locally with
mkdocs serve - Commit your changes
To see all available documentation versions:
cd docs
mike listTo deploy a version locally (requires git repository):
cd docs
# Deploy a specific version
mike deploy v1.0.0 latest
# Set the default version
mike set-default latest
# Serve locally to test
mike serveThen navigate to http://localhost:8000 to view the versioned documentation.
cd docs
mike delete v1.0.0The documentation is automatically deployed to GitHub Pages using two workflows:
.github/workflows/docs.yml: Deploys thedevversion when changes are pushed to the main branch.github/workflows/create-release.yml: Deploys versioned documentation when a release tag is created
- Push to
mainbranch → Deploys asdevversion (hidden from dropdown) - Push tag
v1.0.0→ Deploys asv1.0.0version AND updateslatestalias (visible in dropdown) - The
latestalias always points to the most recent tagged release - The default version shown to users is
latest
All versions are stored in the gh-pages branch.
The dev version doesn't appear in the version selector but can be accessed directly:
- URL:
https://opendatahub-io.github.io/models-as-a-service/dev/
This keeps the version dropdown clean for end users while still making development docs available for contributors.
When a new release tag is created using the create-release.yml workflow, the following automation occurs:
-
MAAS_REF Updates: All references to
MAAS_REF="main"in documentation and scripts are automatically updated to use the new release tag (e.g.,MAAS_REF="v1.0.0"). -
What Gets Updated:
- Documentation files (
.mdfiles) - Deployment scripts (
.shfiles) - All variations:
export MAAS_REF="main",MAAS_REF="main",MAAS_REF:=main
- Documentation files (
-
Usage:
- For production deployments, use a release tag:
export MAAS_REF="v1.0.0" - For development/testing, use:
export MAAS_REF="main"
- For production deployments, use a release tag:
This ensures that documentation and deployment scripts always reference stable release tags rather than the moving main branch.