2022-11-06 22:35:45 +01:00
|
|
|
# This Link Checker is run on all documentation files once per week.
|
|
|
|
|
|
|
|
# references:
|
|
|
|
# - https://github.com/lycheeverse/lychee-action
|
|
|
|
# - https://github.com/lycheeverse/lychee
|
|
|
|
|
|
|
|
name: Link Checker
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- develop
|
2022-11-15 09:46:41 +01:00
|
|
|
- master
|
2022-11-06 22:35:45 +01:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-11-15 09:46:41 +01:00
|
|
|
- master
|
2023-03-07 12:51:24 +01:00
|
|
|
workflow_dispatch:
|
2022-11-06 22:35:45 +01:00
|
|
|
schedule:
|
|
|
|
# * is a special character in YAML so you have to quote this string
|
2022-12-27 06:05:07 +01:00
|
|
|
- cron: '30 8 * * *'
|
2022-11-06 22:35:45 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
linkChecker:
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-10 19:23:03 +01:00
|
|
|
permissions:
|
|
|
|
# lychee only uses the GITHUB_TOKEN to avoid rate-limiting
|
|
|
|
contents: read
|
2022-11-06 22:35:45 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Restore lychee cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: .lycheecache
|
|
|
|
key: cache-lychee-${{ github.sha }}
|
|
|
|
restore-keys: cache-lychee-
|
|
|
|
|
|
|
|
- name: Link Checker
|
2023-03-06 03:32:05 +01:00
|
|
|
uses: lycheeverse/lychee-action@v1.6.1
|
2022-11-06 22:35:45 +01:00
|
|
|
with:
|
2023-03-07 12:51:24 +01:00
|
|
|
args: >-
|
|
|
|
--verbose
|
|
|
|
--no-progress
|
|
|
|
--cache
|
|
|
|
--max-cache-age 1d
|
|
|
|
packages/mermaid/src/docs/**/*.md
|
|
|
|
README.md
|
|
|
|
README.zh-CN.md
|
2022-11-06 22:35:45 +01:00
|
|
|
fail: true
|
|
|
|
jobSummary: true
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|