Skip to content

Commit

Permalink
Add link checker
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref authored and check-spelling-bot committed Sep 24, 2024
1 parent 28d78dd commit 96e7feb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ imageflow
imazen
interoperate
jitsi
linkchecker
mergeable
noreply
oneline
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Link Checker

on:
push:
workflow_dispatch:

jobs:
link-checker:
name: Run link checker
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: set up link checker
run: |
python3 -m venv linkchecker
. linkchecker/bin/activate
pip3 install linkchecker
- name: check links
run: |
(
echo '# Link Checker'
echo
echo '```'
./linkchecker/bin/linkchecker https://docs.check-spelling.dev/ |
perl -ne '
if (/^Start checking/) {
$state = 1;
print STDERR;
next;
}
if (/^Statistics:/) {
$state = 2;
}
if ($state == 1) {
print;
} else {
print STDERR;
}
'
echo '```'
echo
) >> "$GITHUB_STEP_SUMMARY"

0 comments on commit 96e7feb

Please sign in to comment.