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

Commit b27d7d2

Browse files
ti-srebotcsuzhangxcyikeke
authored
*: check link via GitHub action (#353) (#357)
* cherry pick #353 to release-2.0 Signed-off-by: ti-srebot <[email protected]> * Update ci.yaml Co-authored-by: Xuecheng Zhang <[email protected]> Co-authored-by: yikeke <[email protected]>
1 parent e303b25 commit b27d7d2

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
config: './.markdownlint.yaml'
1919
args: '.'
20-
- name: Verify links
20+
- name: Verify internal links
2121
run: ./hack/verify-links.sh
22-
- name: Verify link anchors
22+
- name: Verify internal link anchors
2323
run: ./hack/verify-link-anchors.sh

.github/workflows/link-check.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: external-link-check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
base:
7+
runs-on: ubuntu-18.04
8+
steps:
9+
- name: Check out code
10+
uses: actions/checkout@v2
11+
12+
# NOTE:
13+
# - the check process can be very fast,
14+
# but if `-c` is too large then `Too Many Requests (HTTP error 429)` may be reported from `https://github.com/*`.
15+
# - we hardcode `--document-root` to `/github/workspace` in the container now.
16+
# - we use `http://172.*` as sample addresses in some docs, so we need to exclude them.
17+
- name: Check external links in zh files
18+
uses: peter-evans/link-checker@v1
19+
with:
20+
args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" zh*
21+
22+
- name: Check external links in en files
23+
id: lc
24+
uses: peter-evans/link-checker@v1
25+
with:
26+
args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" en*
27+
28+
- name: Fail if there were external link errors
29+
if: ${{ steps.lc.outputs.exit_code }}
30+
run: |
31+
echo "Please check the broken links reported in previous steps \"Check external links in zh files\" and \"Check external links in en files\"."
32+
exit ${{ steps.lc.outputs.exit_code }}
33+
34+
# Debug via SSH if previous steps failed
35+
#- name: Set up tmate session
36+
# if: ${{ failure() }}
37+
# uses: mxschmitt/action-tmate@v2

en/maintain-dm-using-tiup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Execute `tiup list dm-master` to view the latest cluster version supported by Ti
265265

266266
The process of using the `import` command is as follows:
267267

268-
1. TiUP generates a topology file [`topology.yml`](https://github.com/pingcap/tiup/blob/master/examples/topology.dm.example.yaml) based on the DM cluster previously deployed using DM-Ansible.
268+
1. TiUP generates a topology file [`topology.yml`](https://github.com/pingcap/tiup/blob/master/examples/dm/topology.example.yaml) based on the DM cluster previously deployed using DM-Ansible.
269269
2. After confirming that the topology file has been generated, you can use it to deploy the DM cluster of v2.0 or later versions.
270270

271271
After the deployment is completed, you can execute the `tiup dm start` command to start the cluster and begin the process of upgrading the DM kernel.

0 commit comments

Comments
 (0)