Skip to content

fix: Update documentation setup with analytics and improved checks #14

fix: Update documentation setup with analytics and improved checks

fix: Update documentation setup with analytics and improved checks #14

Workflow file for this run

name: Documentation
on:
push:
paths:
- "docs/**"
- "**.md"
- "mkdocs.yml"
- "requirements-docs.txt"
- "scripts/check_docs.py"
branches:
- main
pull_request:
paths:
- "docs/**"
- "**.md"
- "mkdocs.yml"
- "requirements-docs.txt"
- "scripts/check_docs.py"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-docs.txt
- name: Check documentation
run: |
python scripts/check_docs.py
- name: Create site directory
run: mkdir -p site
- name: Ensure js directory exists
run: |
mkdir -p docs/js
- name: Build documentation
run: |
mkdocs build --strict --verbose
- name: Deploy Documentation
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
mkdocs gh-deploy --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload documentation artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: documentation
path: site/
if-no-files-found: warn
retention-days: 14