Skip to content

Commit

Permalink
add lychee gh actions to check for dead links
Browse files Browse the repository at this point in the history
  • Loading branch information
moimikey committed Feb 19, 2024
1 parent 5478005 commit 46d13a9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/links-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dead Links (Fail Fast)

on:
push:
pull_request:

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Link Checker
uses: lycheeverse/lychee-action@v1.9.0
with:
fail: true
args: --base . --verbose --no-progress 'README.md'
26 changes: 26 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dead Links (Cron)

on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "00 18 * * *"

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.9.0
args: --base . --verbose --no-progress 'README.md'

- 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/README.report.md
labels: report, automated issue

0 comments on commit 46d13a9

Please sign in to comment.