Skip to content

Running linkchecker on top of latest main instead of an old fork #466

Running linkchecker on top of latest main instead of an old fork

Running linkchecker on top of latest main instead of an old fork #466

name: Check external links
on:
pull_request:
branches: [ main, staging, production ]
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- name: Checkout code (merge of PR + base)
uses: actions/checkout@v4
with:
# For pull_request events, this is the "virtual" merge commit
# If the PR can't be merged (conflicts), this ref won't exist.
ref: ${{ github.event_name == 'pull_request' && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.ref }}
fetch-depth: 0
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.8.0
with:
args: --accept 200,429,403 --timeout 60 --retry-wait-time 15 --max-retries 10 '**/*.md'
fail: true