Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 9 additions & 1 deletion .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Validate existing links

on:
push:
branches-ignore:
- live
repository_dispatch:
workflow_dispatch:
schedule:
Expand All @@ -16,13 +18,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Resolve root-relative links for checking
run: |
# Convert root-relative markdown links like [text](/path) to [text](https://learn.microsoft.com/path)
# so lychee can validate them. This only modifies the CI checkout copy.
find . -name '*.md' -exec sed -i -E 's|\]\(/|\](https://learn.microsoft.com/|g' {} +

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@master
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: --accept=200,429,403,502,503 --verbose --no-progress './**/*.md'
args: --config=.lychee.toml --accept=200,429,403,502,503 --verbose --no-progress './**/*.md'
fail: true

- name: Create Issue From File
Expand Down
2 changes: 2 additions & 0 deletions .lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Lychee link checker configuration
# https://github.com/lycheeverse/lychee/blob/master/lychee.example.toml
Loading