-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lightweight workflow to check for broken markdown links (#1271)
- Loading branch information
Showing
4 changed files
with
42 additions
and
8 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,38 @@ | ||
name: Check Markdown Links | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check-links: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Markdown Link Checker | ||
run: npm install -g markdown-link-check | ||
|
||
- name: Create config for markdown link checker | ||
run: | | ||
echo '{ | ||
"projectBaseUrl":"${{ github.workspace }}", | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "^#" | ||
}, | ||
{ | ||
"pattern": "^https://falconllm.tii.ae" | ||
} | ||
] | ||
}' > $GITHUB_WORKSPACE/md_checker_config.json | ||
- name: Find Markdown Files and Check Links | ||
run: | | ||
find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check -c $GITHUB_WORKSPACE/md_checker_config.json |
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
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
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