Files
django/.github/workflows/docs.yml
Natalia f87c2055b4 Fixed spell checking in docs GitHub Actions workflow.
The spelling check job was passing even with spelling errors because
the system spell checker (`aspell`) was not installed on the GitHub
Actions runner. While `sphinxcontrib.spelling` and `PyEnchant` were
installed via pip, they require a system-level spell checker backend
to function.
2026-01-29 11:20:11 -03:00

88 lines
2.1 KiB
YAML

name: Docs
on:
pull_request:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
docs:
runs-on: ubuntu-24.04
name: spelling
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'
cache-dependency-path: 'docs/requirements.txt'
- name: Install system spell checker
run: sudo apt update && sudo apt install -y aspell aspell-en
- run: python -m pip install -r docs/requirements.txt
- name: Build docs
run: |
cd docs
sphinx-build -b spelling -n -q -W -d _build/doctrees -D language=en_US -j auto . _build/spelling
blacken-docs:
runs-on: ubuntu-latest
name: blacken-docs
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- run: python -m pip install blacken-docs
- name: Build docs
run: |
cd docs
make black
RESULT=`cat _build/black/output.txt`
if [ "$RESULT" -gt 0 ]; then
echo "💥 📢 Code blocks in documentation must be reformatted with blacken-docs 📢 💥"
fi;
exit $RESULT
lint-docs:
runs-on: ubuntu-latest
name: lint-docs
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- run: python -m pip install sphinx-lint
- name: Build docs
run: |
cd docs
make lint