Add documentation link checking and fix broken links #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow checks for broken links in the documentation | |
name: Documentation Link Check | |
on: | |
push: | |
branches: [ "master" ] | |
paths: | |
- 'docs/**' | |
- '.github/workflows/docs-linkcheck.yml' | |
pull_request: | |
branches: [ "master" ] | |
paths: | |
- 'docs/**' | |
- '.github/workflows/docs-linkcheck.yml' | |
# Allow manual execution | |
workflow_dispatch: | |
# Run weekly to catch external link breakage | |
schedule: | |
- cron: '0 12 * * 1' # Monday at 12:00 UTC | |
jobs: | |
linkcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Install documentation dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r docs/requirements.txt | |
- name: Run Sphinx linkcheck | |
run: | | |
cd docs | |
sphinx-build -b linkcheck . _build/linkcheck -W --keep-going | |
- name: Upload linkcheck results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: linkcheck-results | |
path: docs/_build/linkcheck/ |