1. name: Docs
    
  2. 
    
  3. on:
    
  4.   pull_request:
    
  5.     paths:
    
  6.       - 'docs/**'
    
  7.       - '.github/workflows/docs.yml'
    
  8.   push:
    
  9.     branches:
    
  10.       - main
    
  11.     paths:
    
  12.       - 'docs/**'
    
  13.       - '.github/workflows/docs.yml'
    
  14. 
    
  15. concurrency:
    
  16.   group: ${{ github.workflow }}-${{ github.ref }}
    
  17.   cancel-in-progress: true
    
  18. 
    
  19. jobs:
    
  20.   docs:
    
  21.     # OS must be the same as on djangoproject.com.
    
  22.     runs-on: ubuntu-20.04
    
  23.     name: docs
    
  24.     steps:
    
  25.       - name: Checkout
    
  26.         uses: actions/checkout@v3
    
  27.       - name: Set up Python
    
  28.         uses: actions/setup-python@v3
    
  29.         with:
    
  30.           python-version: '3.10'
    
  31.           cache: 'pip'
    
  32.           cache-dependency-path: 'docs/requirements.txt'
    
  33.       - run: python -m pip install -r docs/requirements.txt
    
  34.       - name: Build docs
    
  35.         run: |
    
  36.           cd docs
    
  37.           sphinx-build -b spelling -n -q -W --keep-going -d _build/doctrees -D language=en_US -j auto . _build/spelling