Skip to content

Commit

Permalink
.github: add a new external link checker (pingcap#7121)
Browse files Browse the repository at this point in the history
  • Loading branch information
ran-huang authored Dec 7, 2021
1 parent 43fb2b2 commit bc2c20e
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 35 deletions.
19 changes: 19 additions & 0 deletions .github/exclude-links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
http://\$ip:10080/
http://grafana_ip:3000/
http://__grafana_ip__:3000
http:/ip:status_port/config
http:/pd_ip:pd_port/
http:/DASHBOARD_IP:PORT/
https://download.pingcap.org
https://kms.us-west-2.amazonaws.com/
http://9.9.9.9:2379/
http://ip:2379/
http://spark-master-hostname:8080/
http:/\$%7Btidb-server-ip%7D:\$%7Btidb-server-status-port%7D/
http:/\$%7BPD_IP%7D:\$%7BPD_PORT%7D
http://__tidb_ip__:10080
https://s3.amazonaws.com/
http:/192.168.0.16:2379
http:/192.168.0.15:2379
http:/192.168.0.14:2379
https://www.crunchbase.com/organization/
31 changes: 0 additions & 31 deletions .github/workflows/link-check.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/link.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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: TomShawn

# - name: Fail if there were link errors
# run: exit ${{ steps.lychee.outputs.exit_code }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ 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%2Fblob%2Fmaster%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%2Fblob%2Fmaster%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%2Fblob%2Fmaster%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%2Fblob%2Fmaster%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%2Fblob%2Fmaster%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%2Fblob%2Fmaster%2FTOC.md)

## Documentation versions

Expand Down
2 changes: 1 addition & 1 deletion connectors-and-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The third-party APIs are not developed by Oracle. The following table lists the

| Environment | API | Type | Notes |
| -------------- | ---------------------------------------- | -------------------------------- | ---------------------------------------- |
| Ada | GNU Ada MySQL Bindings | `libmysqlclient` | See [MySQL Bindings for GNU Ada](http://gnade.sourceforge.net/) |
| Ada | GNU Ada MySQL Bindings | `libmysqlclient` | See MySQL Bindings for GNU Ada. |
| C | C API | `libmysqlclient` | See [MySQL C API](https://dev.mysql.com/doc/refman/5.7/en/c-api-info.html) |
| C++ | Connector/C++ | `libmysqlclient` | See [MySQL Connector/C++ Developer Guide](https://dev.mysql.com/doc/connector-cpp/en/) |
| | MySQL++ | `libmysqlclient` | See [MySQL++ Web site](http://tangentsoft.net/mysql++/doc/) |
Expand Down

0 comments on commit bc2c20e

Please sign in to comment.