Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
chore(ci): add link check
Browse files Browse the repository at this point in the history
  • Loading branch information
mysteryven authored and Boshen committed Nov 12, 2023
1 parent 16a9bf8 commit a5114b8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Check Links

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

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

0 comments on commit a5114b8

Please sign in to comment.