Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include_fragments = true

accept = ["200..=299", "429"]

exclude = [
"^http(s)?://localhost",
"^http(s)?://example.com"
]
48 changes: 48 additions & 0 deletions .github/workflows/check-links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: check-links
on:
push:
branches: [main]
pull_request:
Comment thread
apatniv marked this conversation as resolved.
Outdated
merge_group:
types: [checks_requested]

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions: read-all

jobs:
changedfiles:
name: changed files
runs-on: ubuntu-latest
env:
PR_HEAD: ${{ github.event.pull_request.head.sha }}
outputs:
files: ${{ steps.changes.outputs.files }}
steps:
- name: Checkout Repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Get changed files
id: changes
run: |
files=$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main $PR_HEAD) $PR_HEAD | grep .md$ | xargs)
echo "files=$files" >> $GITHUB_OUTPUT
check-links:
runs-on: ubuntu-latest
needs: changedfiles
if: ${{needs.changedfiles.outputs.files}}
steps:
- name: Checkout Repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
with:
args: "--verbose --no-progress ${{needs.changedfiles.outputs.files}} --config .github/lychee.toml"
failIfEmpty: false
Loading