Skip to content

Fix docs deployment

Fix docs deployment #5

Workflow file for this run

name: Documentation
on:
push:
branches: [ main ]
paths:
- 'docs/**'
- 'mkdocs.yml'
- '.github/workflows/docs.yml'
- 'pyproject.toml'
- 'requirements*.txt'
- 'noxfile.py'
pull_request:
branches: [ main ]
paths:
- 'docs/**'
- 'mkdocs.yml'
- '.github/workflows/docs.yml'
- 'pyproject.toml'
- 'requirements*.txt'
- 'noxfile.py'
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Configure Git
if: 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"
- name: Build documentation
if: github.event_name == 'pull_request'
run: |
nox -s docs -- build
- name: Deploy documentation
if: github.event_name == 'push'
run: |
nox -s docs -- deploy