1.4 KB53 lines
Blame
1# This Link Checker is run on all documentation files once per week.
2
3# references:
4# - https://github.com/lycheeverse/lychee-action
5# - https://github.com/lycheeverse/lychee
6
7name: Link Checker
8
9on:
10 push:
11 branches:
12 - develop
13 - master
14 pull_request:
15 branches:
16 - master
17 workflow_dispatch:
18 schedule:
19 # * is a special character in YAML so you have to quote this string
20 - cron: '30 8 * * *'
21
22permissions: # added using https://github.com/step-security/secure-repo
23 contents: read
24
25jobs:
26 link-checker:
27 runs-on: ubuntu-latest
28 permissions:
29 # lychee only uses the GITHUB_TOKEN to avoid rate-limiting
30 contents: read
31 steps:
32 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33
34 - name: Restore lychee cache
35 uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
36 with:
37 path: .lycheecache
38 key: cache-lychee-${{ github.sha }}
39 restore-keys: cache-lychee-
40
41 - name: Link Checker
42 uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 # v2.3.0
43 with:
44 args: >-
45 --config .github/lychee.toml
46 packages/mermaid/src/docs/**/*.md
47 README.md
48 README.zh-CN.md
49 fail: true
50 jobSummary: true
51 env:
52 GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
53