Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,21 @@ jobs:
pip install tox-uv
tox -e lint-${{ matrix.py-version.tox }}

lychee:
name: "Link Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false
- uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args: -vv --root-dir ${{ github.workspace }} --config lychee.toml baybe docs examples README.md CONTRIBUTING.md CHANGELOG.md

build-docs:
name: "Build Docs"
runs-on: ubuntu-latest
needs: [lint]
needs: [lint, lychee]
permissions:
contents: read
pages: write # Required to deploy to GitHub Pages
Expand Down
22 changes: 11 additions & 11 deletions docs/scripts/check_links.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""Utility for checking the links of the documentation."""
"""Utility for checking the cross-references of the documentation."""

from subprocess import check_call


def check_links() -> None:
"""Check whether the links of the documentation are valid."""
link_call = [
"sphinx-build",
"-b",
"linkcheck",
"docs",
"docs/build",
]

check_call(link_call)
"""Check that documentation cross-references resolve (external links: lychee)."""
check_call(
[
"sphinx-build",
"-b",
"dummy",
"docs",
"docs/build",
]
)
7 changes: 7 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# External link check. Keep `exclude` in sync with `linkcheck_ignore` in docs/conf.py.
scheme = ["https", "http"]
exclude = [
"https://github\\.com/b-shields/edbo/blob.*",
"https://doi\\.org/10\\.26434/chemrxiv\\.10001986/v2",
"https://doi\\.org/10\\.1039/D5DD00050E",
]
Loading