mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 09:20:03 +02:00
Add GHA that checks links (using lychee). Incl list of links to ignore.
This commit is contained in:
42
.github/workflows/link-checker.yml
vendored
Normal file
42
.github/workflows/link-checker.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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:
|
||||
# TODO remove before merging.
|
||||
# just using the push and pull_request event in for testing only.
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
schedule:
|
||||
# * is a special character in YAML so you have to quote this string
|
||||
- cron: '30 8 * * 5'
|
||||
|
||||
jobs:
|
||||
linkChecker:
|
||||
runs-on: ubuntu-latest
|
||||
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.2
|
||||
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}}
|
10
.lycheeignore
Normal file
10
.lycheeignore
Normal file
@@ -0,0 +1,10 @@
|
||||
# These links are ignored by our link checker https://github.com/lycheeverse/lychee
|
||||
# The file allows you to list multiple regular expressions for exclusion (one pattern per line).
|
||||
|
||||
# Network error: Forbidden
|
||||
https://codepen.io
|
||||
|
||||
# Network error: The certificate was not trusted
|
||||
https://mkdocs.org/
|
||||
https://osawards.com/javascript/#nominees
|
||||
https://osawards.com/javascript/2019
|
Reference in New Issue
Block a user