From 5664d341509f75b93d9eaf4aa436685ed80ea016 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 19 Jan 2023 14:32:07 +0100 Subject: [PATCH] DX: run `linkcheck` on GitHub Actions See also https://github.com/ComPWA/repo-maintenance/issues/57 --- .cspell/this-project.txt | 1 + .github/workflows/ci-docs.yml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.cspell/this-project.txt b/.cspell/this-project.txt index 0a388a44..d712f034 100644 --- a/.cspell/this-project.txt +++ b/.cspell/this-project.txt @@ -14,6 +14,7 @@ latexmk LATEXMKOPTS LATEXOPTS latexpdf +linkcheck lualatex MAINT Mikhasenko diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index ad898f97..57b97d49 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -68,11 +68,32 @@ jobs: name: latex path: docs/_build/latex + linkcheck: + name: Check external links + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + key: | + ${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-${{ hashFiles('.constraints/py3.*.txt', 'setup.cfg') }} + path: | + ~/.cache/pip/ + - uses: actions/setup-python@v4 + with: + python-version: "3.8" + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -c .constraints/py3.8.txt -e .[doc] tox + - run: tox -e linkcheck + documentation: name: Run notebooks and build documentation needs: - html-fast - pdf-fast + - linkcheck if: github.event_name != 'pull_request' runs-on: ubuntu-22.04 steps: