name: Documentation

on:
  pull_request:
    paths:
      - 'docs/**'
  push:
    paths:
      - 'docs/**'

jobs:
  docs:
    name: nox -s docs
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    - uses: actions/setup-python@v2
      name: Install Python
      with:
        python-version: '3.9'

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install --upgrade nox

    - name: Build documentation
      run: python -m nox -s docs
