Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
.github: add external link checker (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
ran-huang authored Dec 7, 2021
1 parent 67ef643 commit f96c49f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 42 deletions.
4 changes: 4 additions & 0 deletions .github/exclude-links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
http:/127.0.0.1
http:/192.168.0.4
http:/192.168.0.5
http:/192.168.0.6
38 changes: 0 additions & 38 deletions .github/workflows/link-check.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/link.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Links

on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Link Checker
uses: lycheeverse/lychee-action@v1.1.1
with:
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
args: -E --exclude-mail -v -i -n -a 429 -t 45 --exclude-file ./.github/exclude-links.txt -- **/*.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v3
with:
title: Broken Link Detected
content-filepath: ./lychee/out.md
assignees: shichun-0415
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Currently, the official documentation supports two languages:

You can use Google Translate to view the documentation in different languages. For example:

- `fr`: [documentation in French](http://translate.google.com/translate?hl=en&sl=en&tl=fr&u=https%3A%2F%2Fgithub.com%2Fpingcap%2Fdocs-dm%2Fblob%2Fmaster%2Fen%2FTOC.md)
- `ja`: [documentation in Japanese](http://translate.google.com/translate?hl=en&sl=en&tl=ja&u=https%3A%2F%2Fgithub.com%2Fpingcap%2Fdocs-dm%2Fblob%2Fmaster%2Fen%2FTOC.md)
- `ko`: [documentation in Korean](http://translate.google.com/translate?hl=en&sl=en&tl=ko&u=https%3A%2F%2Fgithub.com%2Fpingcap%2Fdocs-dm%2Fblob%2Fmaster%2Fen%2FTOC.md)
- `id`: [documentation in Indonesian](http://translate.google.com/translate?hl=en&sl=en&tl=id&u=https%3A%2F%2Fgithub.com%2Fpingcap%2Fdocs-dm%2Fblob%2Fmaster%2Fen%2FTOC.md)
- `fr`: [documentation in French](https://translate.google.com/translate?hl=en&sl=en&tl=fr&u=https%3A%2F%2Fgithub.com%2Fpingcap%2Fdocs-dm%2Fblob%2Fmaster%2Fen%2FTOC.md)
- `ja`: [documentation in Japanese](https://translate.google.com/translate?hl=en&sl=en&tl=ja&u=https%3A%2F%2Fgithub.com%2Fpingcap%2Fdocs-dm%2Fblob%2Fmaster%2Fen%2FTOC.md)
- `ko`: [documentation in Korean](https://translate.google.com/translate?hl=en&sl=en&tl=ko&u=https%3A%2F%2Fgithub.com%2Fpingcap%2Fdocs-dm%2Fblob%2Fmaster%2Fen%2FTOC.md)
- `id`: [documentation in Indonesian](https://translate.google.com/translate?hl=en&sl=en&tl=id&u=https%3A%2F%2Fgithub.com%2Fpingcap%2Fdocs-dm%2Fblob%2Fmaster%2Fen%2FTOC.md)

## Documentation versions

Expand Down

0 comments on commit f96c49f

Please sign in to comment.