Skip to content

Commit 5d6910e

Browse files
authored
Enable Mkdocs validation (#1383)
* Warn unrecognized_links and anchors * Run mkdocs build --strict https://www.mkdocs.org/user-guide/configuration/#validation * Trigger the workflow by current file changes * Install mkdocs only * Revert "Install mkdocs only" This reverts commit 57d1c71.
1 parent 09a2b47 commit 5d6910e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/links.yml

+7
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ on:
88
- docs/**
99
- README.md
1010
- RELEASING.md
11+
- .github/workflows/links.yml
1112
pull_request:
1213
paths:
1314
- docs/**
1415
- README.md
1516
- RELEASING.md
17+
- .github/workflows/links.yml
1618
workflow_dispatch:
1719

1820
jobs:
@@ -25,6 +27,11 @@ jobs:
2527
cache-read-only: true
2628
# This is required for action-linkspector to work with API links.
2729
- run: ./gradlew dokkaHtml
30+
- name: Mkdocs build validation
31+
run: |
32+
# Don't cache it to track updates.
33+
pip install mkdocs-material
34+
mkdocs build --strict
2835
- uses: umbrelladocs/action-linkspector@v1
2936
with:
3037
reporter: github-pr-check

mkdocs.yml

+4
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,7 @@ nav:
7777
- 'Changes': changes/README.md
7878
- 'API': api/index.html
7979
- 'About': about/README.md
80+
81+
validation:
82+
unrecognized_links: warn
83+
anchors: warn

0 commit comments

Comments
 (0)