-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a link checker workflow (#137)
https://github.com/lycheeverse/lychee-action This will help us catch any broken links in the future
- Loading branch information
1 parent
73e005c
commit 49f27a5
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Links | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/[email protected] | ||
with: | ||
args: >- | ||
--exclude-all-private | ||
--verbose --no-progress | ||
--user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' | ||
--max-redirects 10 | ||
--header "accept=*/*" | ||
--accept 200,204,206,403,429 | ||
--base 'https://thewiki.moe' | ||
--exclude-path './docs/hidden' | ||
--exclude '^https://www.amd.com' | ||
--exclude '^https://exhentai.org' | ||
--exclude '^https://www.nzbking.com' | ||
'./**/*.md' | ||
# Public trackers, streaming sites, crunchyroll, kodi, qbittorrent, etc return 403 | ||
# Nyaa returns 429 | ||
# ./docs/hidden has unmaintained legacy files | ||
# AMD fails for reasons unknown to me, exhentai is private, and nzbking has bad uptime | ||
|
||
- name: Create Issue From File | ||
if: env.lychee_exit_code != 0 | ||
uses: peter-evans/create-issue-from-file@v4 | ||
with: | ||
title: Link Checker Report | ||
content-filepath: ./lychee/out.md | ||
labels: report, automated issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters