mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
0949187cf7
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Check links with Lychee
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "docs/**"
|
|
- "*.md"
|
|
branches:
|
|
- main
|
|
|
|
# Remove default permissions of GITHUB_TOKEN for security
|
|
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
|
|
permissions: {}
|
|
|
|
jobs:
|
|
link-checker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Cache lychee results (e.g. to avoid hitting rate limits)
|
|
- name: Restore lychee cache
|
|
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
|
with:
|
|
path: .lycheecache
|
|
key: cache-lychee-${{ github.sha }}
|
|
restore-keys: cache-lychee-
|
|
|
|
# check links with Lychee
|
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
|
|
|
- name: Lychee link checker
|
|
uses: lycheeverse/lychee-action@2ac9f030ccdea0033e2510a23a67da2a2da98492 # for v1.8.0
|
|
with:
|
|
# arguments with file types to check
|
|
args: >-
|
|
--cache
|
|
--verbose
|
|
--no-progress
|
|
--max-cache-age=1d
|
|
'./**/*.md'
|
|
'./**/*.html'
|
|
# fail the action on broken links
|
|
fail: true
|
|
env:
|
|
# to be used in case rate limits are surpassed
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|