docs.yml 893 B

123456789101112131415161718192021222324252627282930313233343536
  1. name: Docs
  2. on:
  3. pull_request:
  4. paths:
  5. - 'docs/**'
  6. push:
  7. branches:
  8. - main
  9. paths:
  10. - 'docs/**'
  11. jobs:
  12. docs:
  13. # OS must be the same as on djangoproject.com.
  14. runs-on: ubuntu-18.04
  15. name: docs
  16. steps:
  17. - name: Checkout
  18. uses: actions/checkout@v2
  19. - name: Set up Python
  20. uses: actions/setup-python@v2
  21. with:
  22. python-version: 3.9
  23. - name: Cache dependencies
  24. uses: actions/cache@v2
  25. with:
  26. path: ~/.cache/pip
  27. key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
  28. restore-keys: |
  29. ${{ runner.os }}-pip-
  30. - run: python -m pip install -r docs/requirements.txt
  31. - name: Build docs
  32. run: |
  33. cd docs
  34. sphinx-build -b spelling -n -q -W --keep-going -d _build/doctrees -D language=en_US -j auto . _build/spelling