Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 1984fc1

Browse files
authored
Use htmltest to check links in the Synapse documentation. (#14743)
* Add htmltest to check links in the documentation * Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) <[email protected]> Signed-off-by: Olivier Wilkinson (reivilibre) <[email protected]>
1 parent 4eb2f4e commit 1984fc1

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/docs-pr.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
paths:
66
- docs/**
7+
- book.toml
8+
- .github/workflows/docs-pr.yaml
79

810
jobs:
911
pages:
@@ -32,3 +34,27 @@ jobs:
3234
path: book
3335
# We'll only use this in a workflow_run, then we're done with it
3436
retention-days: 1
37+
38+
link-check:
39+
name: Check links in documentation
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v2
43+
44+
- name: Setup mdbook
45+
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
46+
with:
47+
mdbook-version: '0.4.17'
48+
49+
- name: Setup htmltest
50+
run: |
51+
wget https://github.com/wjdp/htmltest/releases/download/v0.17.0/htmltest_0.17.0_linux_amd64.tar.gz
52+
echo '775c597ee74899d6002cd2d93076f897f4ba68686bceabe2e5d72e84c57bc0fb htmltest_0.17.0_linux_amd64.tar.gz' | sha256sum -c
53+
tar zxf htmltest_0.17.0_linux_amd64.tar.gz
54+
55+
- name: Test links with htmltest
56+
# Build the book with `./` as the site URL (to make checks on 404.html possible)
57+
# Then run htmltest (without checking external links since that involves the network and is slow).
58+
run: |
59+
MDBOOK_OUTPUT__HTML__SITE_URL="./" mdbook build
60+
./htmltest book --skip-external

changelog.d/14743.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use `htmltest` to check links in the Synapse documentation.

0 commit comments

Comments
 (0)