Enables automatic documentation deployment to GitHub Pages when documentation files are modified on the master branch. Triggers on changes to docs directory or mkdocs.yml configuration file to ensure documentation stays current with code changes.
32 lines
560 B
YAML
32 lines
560 B
YAML
name: Deploy MkDocs
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'docs/**'
|
|
- 'mkdocs.yml'
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install mkdocs
|
|
|
|
- name: Deploy docs
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: mkdocs gh-deploy --force --clean
|