Skip to content

Commit 157721a

Browse files
Check for dead links at PR time and at a nightly interval (#54)
That way the doc is exempt of dead links
1 parent 962c677 commit 157721a

6 files changed

Lines changed: 38 additions & 3 deletions

File tree

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
version: 2
77
updates:
88
- package-ecosystem: "github-actions"
9-
directory: "/"
9+
directory: ".github/workflows"
1010
schedule:
1111
interval: "daily"
1212
- package-ecosystem: "npm" # See documentation for possible values

.github/workflows/build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,14 @@ jobs:
2222
- name: Install dependencies
2323
run: yarn install --frozen-lockfile
2424
- name: Build documentation website
25-
# Check URLs are valid, path to images, etc.
25+
# Check paths are valid, markdown, etc.
2626
run: yarn build
27+
- name: Check links
28+
# exceptions can be added in .lycheeignore file
29+
id: lychee
30+
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
31+
with:
32+
fail: true
33+
failIfEmpty: true
34+
jobSummary: true
35+
args: build --root-dir=${{ github.workspace }}/build --verbose --no-progress --max-redirects=20

.github/workflows/links.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Links checker
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "00 18 * * *"
7+
8+
jobs:
9+
linkChecker:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
14+
- name: Nightly Link Checker
15+
id: lychee
16+
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
17+
with:
18+
fail: true
19+
failIfEmpty: true
20+
jobSummary: true
21+
args: --verbose --no-progress --max-redirects=10 https://nspanelmanager.com

.lycheeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
http://192.168.4.1
2+
http://localhost:8000

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# NSPanelManager Documentation
2+
[![Check Links](https://github.com/NSPManager/NSPanelManager-docs/actions/workflows/links.yml/badge.svg)](https://github.com/NSPManager/NSPanelManager-docs/actions/workflows/links.yml)
23

34
The documentation website [nspanelmanager.com](https://nspanelmanager.com) is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
45

6+
57
### Installation
68

79
```

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@
4444
},
4545
"engines": {
4646
"node": ">=18.0"
47-
}
47+
},
48+
"license": "LGPL-3.0-or-later"
4849
}

0 commit comments

Comments
 (0)