From 9118bf6c17265f236dfea77159e4b3a069f0a591 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 8 Jan 2025 15:48:58 +0100 Subject: [PATCH] Add link check workflow This adds a sphinxbuild link check workflow, which triggers on every pull request or could be manually triggered. Signed-off-by: Stefan Wahren --- .github/workflows/linkcheck.yml | 20 ++++++++++++++++++++ docs/source/conf.py | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/linkcheck.yml diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 0000000..6af21ae --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,20 @@ +name: Link check + +# Allow to trigger on pull requests and manually via Github Actions +on: + pull_request: + workflow_dispatch: + +jobs: + build: + # Use Ubuntu as environment + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + # This external action cares about all the sphinx stuff + - uses: ammaraskar/sphinx-action@4.3.2 + with: + build-command: "sphinx-build -b linkcheck source/ build/" + docs-folder: "docs/" + diff --git a/docs/source/conf.py b/docs/source/conf.py index 331dd03..a0b13e1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -31,3 +31,8 @@ ] html_show_sourcelink = False html_use_index = False + +# -- Options for the linkcheck builder --------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder + +linkcheck_anchors = False