Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: setup link-check github action #551

Merged
merged 1 commit into from Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/link-check.yml
@@ -0,0 +1,40 @@
name: Check Links

on:
workflow_dispatch:
push:
branches:
- main
paths:
- '**/*.md'
- '**/*.html'
pull_request:
types: [opened, synchronize]
paths:
- '**/*.md'
- '**/*.html'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
check-links:
name: Check Links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check Links
uses: lycheeverse/lychee-action@master
with:
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
# Accept 429 for now due to GitHub rate limit.
# See https://github.com/lycheeverse/lychee/issues/634
# Exclude twitter links, see https://github.com/lycheeverse/lychee/issues/1108.
# Ideally this is built in, by https://github.com/lycheeverse/lychee/pull/1147.
# Not sure why it doesn't work, exclude it manually.
args: --accept 200,429 --verbose --no-progress --exclude 'https://twitter\.com/*' .
# Fail action on broken links
fail: true