-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a4743f
commit 4ef0305
Showing
1 changed file
with
37 additions
and
0 deletions.
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,37 @@ | ||
name: Check Markdown Links | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Set up Node.js (required for markdown-link-check) | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
# Install markdown-link-check | ||
- name: Install markdown-link-check | ||
run: | | ||
npm install -g markdown-link-check | ||
# Find and check all Markdown files | ||
- name: Check links in Markdown files | ||
run: | | ||
# Find all .md files and check their links | ||
find . -name "*.md" | while read file; do | ||
echo "Checking $file" | ||
markdown-link-check "$file" -q || echo "$file contains broken links" | ||
done |