Skip to content

Commit 94dd070

Browse files
committed
github: use lychee for docs link checking
1 parent ca9a055 commit 94dd070

File tree

3 files changed

+28
-38
lines changed

3 files changed

+28
-38
lines changed

.github/workflows/docs-linkcheck.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: "Docs linkcheck"
22

33
on:
4+
pull_request:
45
workflow_dispatch:
56
schedule:
67
- cron: '0 7 * * 1' # At 07:00 on Monday
@@ -23,4 +24,6 @@ jobs:
2324
persist-credentials: false
2425
- uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34
2526
- name: "Check docs links"
26-
run: nix run --print-build-logs '.#ci-scripts/docs-linkcheck'
27+
run: nix run --print-build-logs '.#checks.x86_64-linux.docs-linkcheck.online'
28+
env:
29+
GITHUB_TOKEN: ${{ github.token }}

pkgs/ci-scripts/by-name/docs-linkcheck/package.nix

Lines changed: 0 additions & 37 deletions
This file was deleted.

pkgs/tests/default.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
# Non-NixOS tests
22
{ pkgs, ... }:
33
{
4+
docs-linkcheck = pkgs.testers.lycheeLinkCheck {
5+
site = "${pkgs.epnix.docs}/share/doc/epnix/html";
6+
remap = let
7+
current-version = pkgs.epnixLib.versions.current;
8+
current-branch = if current-version == "dev" then "master" else current-version;
9+
in {
10+
"^https://epics-extensions.github.io/EPNix/${current-version}/" =
11+
"file://${pkgs.epnix.docs}/share/doc/epnix/html/";
12+
13+
"^https://github.com/epics-extensions/(epn|EPN)ix/blob/${current-branch}/([^?]+)(\\?.+)?$" = "file://${self}/\\$2";
14+
"^https://github.com/epics-extensions/(epn|EPN)ix/tree/${current-branch}/([^?]+)(\\?.+)?$" = "file://${self}/\\$2";
15+
"^https://github.com/epics-extensions/(epn|EPN)ix/edit/${current-branch}/([^?]+)(\\?.+)?$" = "file://${self}/\\$2";
16+
};
17+
extraConfig = {
18+
max_concurrency = 5;
19+
max_retries = 5;
20+
retry_wait_time = 3;
21+
22+
exclude_all_private = true;
23+
extensions = [ "html" ];
24+
require_https = true;
25+
hosts."matrix.to".include_fragments = false;
26+
};
27+
};
428
}

0 commit comments

Comments
 (0)