mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-24 00:59:23 -05:00
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) <oliverw@matrix.org> Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
This commit is contained in:
parent
4eb2f4e02b
commit
1984fc16f1
26
.github/workflows/docs-pr.yaml
vendored
26
.github/workflows/docs-pr.yaml
vendored
@ -4,6 +4,8 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- docs/**
|
- docs/**
|
||||||
|
- book.toml
|
||||||
|
- .github/workflows/docs-pr.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pages:
|
pages:
|
||||||
@ -32,3 +34,27 @@ jobs:
|
|||||||
path: book
|
path: book
|
||||||
# We'll only use this in a workflow_run, then we're done with it
|
# We'll only use this in a workflow_run, then we're done with it
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
link-check:
|
||||||
|
name: Check links in documentation
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup mdbook
|
||||||
|
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
|
||||||
|
with:
|
||||||
|
mdbook-version: '0.4.17'
|
||||||
|
|
||||||
|
- name: Setup htmltest
|
||||||
|
run: |
|
||||||
|
wget https://github.com/wjdp/htmltest/releases/download/v0.17.0/htmltest_0.17.0_linux_amd64.tar.gz
|
||||||
|
echo '775c597ee74899d6002cd2d93076f897f4ba68686bceabe2e5d72e84c57bc0fb htmltest_0.17.0_linux_amd64.tar.gz' | sha256sum -c
|
||||||
|
tar zxf htmltest_0.17.0_linux_amd64.tar.gz
|
||||||
|
|
||||||
|
- name: Test links with htmltest
|
||||||
|
# Build the book with `./` as the site URL (to make checks on 404.html possible)
|
||||||
|
# Then run htmltest (without checking external links since that involves the network and is slow).
|
||||||
|
run: |
|
||||||
|
MDBOOK_OUTPUT__HTML__SITE_URL="./" mdbook build
|
||||||
|
./htmltest book --skip-external
|
||||||
|
1
changelog.d/14743.misc
Normal file
1
changelog.d/14743.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Use `htmltest` to check links in the Synapse documentation.
|
Loading…
Reference in New Issue
Block a user