name: Docs-Windows # Only run on changes that might affect the Windows docs tooling. (The Ubuntu # equivalents in docs.yml are run for all docs changes.) on: pull_request: paths: - 'docs/make.bat' - 'docs/**.py' - 'docs/requirements.txt' - 'tests/sphinx_tests/**' - '.github/workflows/docs_win.yml' push: branches: - main paths: - 'docs/make.bat' - 'docs/**.py' - 'docs/requirements.txt' - 'tests/sphinx_tests/**' - '.github/workflows/docs_win.yml' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: docs: runs-on: windows-latest defaults: run: working-directory: docs timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v7 with: persist-credentials: false - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.15' cache: 'pip' cache-dependency-path: 'docs/requirements.txt' - run: python -m pip install -r requirements.txt # Batch file exit status is ignored with PowerShell or bash. `shell: cmd` # is the workaround -- see https://github.com/actions/runner/issues/351. - name: Lint shell: cmd # zizmor: ignore[misfeature] run: .\make.bat lint - name: Black shell: cmd # zizmor: ignore[misfeature] run: .\make.bat black # Spelling runs only on Ubuntu, in docs.yml. PyEnchant on Windows # resolves en_US from the hunspell bundled in its own wheel, so a Windows # run would check against a different dictionary than CI enforces. - name: EPUBCheck shell: cmd # zizmor: ignore[misfeature] run: .\make.bat epubcheck env: SPHINXOPTS: -q sphinx-extension-tests: runs-on: windows-latest timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v7 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 and upgrade packaging tools run: python -m pip install --upgrade pip wheel - name: Install docs requirements and Django run: python -m pip install -r docs/requirements.txt -e . - name: Run tests for Sphinx extensions run: python -Wall tests/runtests.py -v2 sphinx_tests