| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- name: Deploy Documentation
- on:
- push:
- branches:
- - main
- paths:
- - 'docs/**'
- - 'mkdocs.yml'
- - '.github/workflows/docs.yml'
- workflow_dispatch: # Allow manual trigger
- permissions:
- contents: write
- jobs:
- deploy:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
- with:
- fetch-depth: 0 # Fetch all history for git-revision-date-localized plugin
- - name: Setup Python
- uses: actions/setup-python@v5
- with:
- python-version: '3.12'
- - name: Cache dependencies
- uses: actions/cache@v4
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-pip-${{ hashFiles('requirements-docs.txt') }}
- restore-keys: |
- ${{ runner.os }}-pip-
- - name: Install dependencies
- run: |
- pip install --upgrade pip
- pip install -r requirements-docs.txt
- - name: Build and deploy documentation
- run: mkdocs gh-deploy --force
|