Skip to content

Commit a2cb082

Browse files
authored
ci: add markdown link checker in workflow #544 (#586)
1 parent 3366b95 commit a2cb082

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Markdown Link Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/*.md'
7+
workflow_dispatch:
8+
9+
jobs:
10+
link-check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Get Changed Markdown Files
17+
id: changed-files
18+
uses: tj-actions/changed-files@v44
19+
with:
20+
files: |
21+
**/*.md
22+
23+
- name: Run Link Checker
24+
if: steps.changed-files.outputs.any_changed == 'true'
25+
uses: lycheeverse/lychee-action@v1.9.0
26+
with:
27+
# Configuration is defined here directly in YAML (no JSON file needed)
28+
# --exclude-loopback: ignores localhost/127.0.0.1
29+
# --verbose: shows details in the logs
30+
args: --verbose --no-progress --exclude-loopback ${{ steps.changed-files.outputs.all_changed_files }}
31+
fail: true

0 commit comments

Comments
 (0)