summaryrefslogtreecommitdiff
path: root/.github/workflows/docs.yml
blob: 09ac17f9422bbbb8c7f97911d84453881cedb30e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Build docs and check links
on: [push, pull_request]
jobs:
  docs-linkcheck:
    runs-on: ubuntu-latest
    steps:
      - name: Install pandoc
        run: |
          sudo apt-get install --no-install-recommends pandoc
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.10"
      - name: Double-check Python version
        run: |
          python --version
      - name: Clone Git repository (without depth limitation)
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Install dependencies
        run: |
          python -m pip install -r doc/requirements.txt
      - name: Build HTML
        run: |
          python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/html/ -b html
      - name: Check links
        run: |
          python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/linkcheck/ -b linkcheck
      - name: Upload linkcheck results
        uses: actions/upload-artifact@v4
        if: ${{ success() || failure() }}
        with:
          name: linkcheck
          path: _build/linkcheck/output.*