Nuxt/.github/workflows/docs-check-links.yml
renovate[bot] 70b589a002
chore(deps): update lycheeverse/lychee-action digest to c38ba4f (main) (#28896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-09 14:52:01 +01:00

47 lines
1.3 KiB
YAML

name: docs
on:
pull_request:
paths:
- "docs/**"
- "*.md"
branches:
- main
- 3.x
# 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@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
# check links with Lychee
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Lychee link checker
uses: lycheeverse/lychee-action@c38ba4f281730ee0d64e6963f49b708e01567b86 # 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}}