mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
967d3bbb60
Runs link checker every day to keep cache warm.
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
# 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
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
schedule:
|
|
# * is a special character in YAML so you have to quote this string
|
|
- cron: '30 8 * * *'
|
|
|
|
jobs:
|
|
linkChecker:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
# lychee only uses the GITHUB_TOKEN to avoid rate-limiting
|
|
contents: read
|
|
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
|
|
uses: lycheeverse/lychee-action@v1.5.4
|
|
with:
|
|
args: --verbose --no-progress --cache --max-cache-age 1d packages/mermaid/src/docs/**/*.md README.md README.zh-CN.md
|
|
fail: true
|
|
jobSummary: true
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|