Nuxt/.github/workflows/docs-check-links.yml
renovate[bot] 9797483e61
chore(deps): update all non-major dependencies (main) (#29332)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-08 22:38:20 +02: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@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
# check links with Lychee
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Lychee link checker
uses: lycheeverse/lychee-action@e360f3c89142a5391e094404ea45e5494f1317dd # 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}}