Add workflow for weekly linkcheck
Change-Id: I6b45566688b7d975347fa6a278d70c007fa35780
diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml
new file mode 100644
index 0000000..4d39d1a
--- /dev/null
+++ b/.github/workflows/linkcheck.yml
@@ -0,0 +1,27 @@
+name: Check links
+on:
+ schedule:
+ - cron: '0 12 * * 3'
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+ - name: Check external links
+ run: make linkcheck
+ env:
+ SPHINXOPTS: --color
diff --git a/conf.py b/conf.py
index e1e0dcc..9537807 100644
--- a/conf.py
+++ b/conf.py
@@ -3,6 +3,8 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
+import sphinx
+
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
@@ -25,6 +27,9 @@
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+# User-Agent header sent with linkcheck HTTP requests.
+user_agent = f'Sphinx/{sphinx.__version__}'
+
# Use ABNF syntax highlighting by default for code blocks.
highlight_language = 'abnf'