Skip to content

refactor: Optimize lychee link exclusion configuration (#12021) #6078

refactor: Optimize lychee link exclusion configuration (#12021)

refactor: Optimize lychee link exclusion configuration (#12021) #6078

name: Check Markdown links for modified files
on: [pull_request]
jobs:
lychee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- name: Get changed markdown files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: |
docs/**/*.md
monthly_changelog/**/*.md
README.md
CONTRIBUTING.md
- name: Restore lychee cache
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .lycheecache
key: cache-lychee-${{ github.ref }}
restore-keys: cache-lychee-
- uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
if: steps.changed-files.outputs.any_changed == 'true'
with:
args: --cache --max-cache-age 14d --quiet ${{ steps.changed-files.outputs.all_changed_files }}
fail: true