GitHub Pages Deployment¶
This repository includes a GitHub Actions workflow at .github/workflows/docs.yml that builds and deploys the MkDocs site automatically.
Automated Deployment via GitHub Actions¶
On push to main or master, or on manual workflow dispatch:
- Checks out the repository
- Sets up Python 3.10
- Installs docs requirements (
requirements-docs.txt) - Runs
mkdocs build --strict(fails build if any warnings found) - Uploads the generated
site/artifact - Deploys via GitHub Pages Actions
Live site: https://mohammedalaa40123.github.io/agentic_safety/
Local Workflow¶
Build and validate locally before pushing:
# Install docs dependencies
pip install -r requirements-docs.txt
# Strict build — catches broken links and missing pages
mkdocs build --strict
# Preview locally with hot-reload
mkdocs serve
Manual Deploy from Local¶
Deploy to gh-pages branch directly (without CI):
Adding New Pages¶
When adding pages:
- Create the
.mdfile underdocs/ - Add an entry to
nav:inmkdocs.yml - Run
mkdocs build --strictto verify no broken references - Commit both the markdown file and the updated
mkdocs.yml
Chart assets
Chart PNGs in docs/assets/charts/ are committed to the repository and served directly. To update them, run python scripts/gen_benchmark_charts.py and commit the outputs.
Configuration Notes¶
site_urlinmkdocs.ymlmust match the GitHub Pages URL exactly.- GitHub Pages settings must be configured to use GitHub Actions (not the legacy
gh-pagesbranch deploy method). site_dir: siteis excluded from version control via.gitignore.