Skip to content

Commit

Permalink
Added a workflow to check for broken links.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliyf committed Sep 17, 2024
1 parent 4c23a7f commit 608116b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/ci-lychee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI - Check Links

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write

jobs:
lychee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- uses: lycheeverse/lychee-action@v1
with:
args: "--verbose --no-progress --cache --max-cache-age 1d './**/*.md'"
fail: false

- name: Add output as PR comment
uses: embrace-io/actions-comment-pull-request@v2
with:
comment_tag: lychee
filePath: lychee/out.md
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.docusaurus
.idea
.lycheecache
build
node_modules
.idea
4 changes: 4 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://github.com/lycheeverse/lychee/blob/master/lychee.example.toml
cache = true
exclude = ['^https://webhook\.site']
max_cache_age = "1d"

0 comments on commit 608116b

Please sign in to comment.