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

*: check connectivity of external links via GitHub action #353

Merged
merged 30 commits into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6074146
*: check link via GitHub action
csuzhangxc Sep 7, 2020
520806b
*: exclude to `media`
csuzhangxc Sep 7, 2020
8e2dc46
*: debug liche
csuzhangxc Sep 7, 2020
7ceef22
*: debug liche
csuzhangxc Sep 7, 2020
bde59d5
*: debug liche
csuzhangxc Sep 7, 2020
9f31ed3
*: debug liche
csuzhangxc Sep 7, 2020
82a5d2f
*: update args for liche
csuzhangxc Sep 7, 2020
c4801f0
Fail if there were link errors
csuzhangxc Sep 7, 2020
4a6c2a1
*: fix env
csuzhangxc Sep 7, 2020
9c7d070
*: try hardcode doc root
csuzhangxc Sep 7, 2020
4f4b712
*: update doc root
csuzhangxc Sep 7, 2020
e31d5f0
*: decrease concurrency to avoid "HTTP error 429"
csuzhangxc Sep 7, 2020
7e606e9
*: decrease concurrency again
csuzhangxc Sep 7, 2020
5a6ba35
*: decrease concurrency to 4; add some notes
csuzhangxc Sep 7, 2020
090fc15
*: exclude "https://github.com/pingcap/dm/pull/.*"
csuzhangxc Sep 7, 2020
6e5e6a1
*: do not show OK
csuzhangxc Sep 7, 2020
6802163
*: try update reg
csuzhangxc Sep 7, 2020
2390174
*: debug reg
csuzhangxc Sep 7, 2020
e285726
*: debug reg
csuzhangxc Sep 7, 2020
43bfd08
*: add echo
csuzhangxc Sep 7, 2020
01c1c68
*: exlude .md files
csuzhangxc Sep 7, 2020
2c902b0
Update .github/workflows/link-check.yaml
csuzhangxc Sep 7, 2020
780ec38
Update .github/workflows/link-check.yaml
csuzhangxc Sep 7, 2020
6b2ead5
Update .github/workflows/link-check.yaml
csuzhangxc Sep 7, 2020
c308e0e
Update .github/workflows/link-check.yaml
csuzhangxc Sep 7, 2020
0e290e0
Update .github/workflows/link-check.yaml
csuzhangxc Sep 7, 2020
0918796
Merge branch 'master' into link-check
csuzhangxc Sep 7, 2020
7628193
fix an external link; update ci.yaml
Sep 7, 2020
81661a9
test ci
Sep 7, 2020
97af4bc
Revert "test ci"
Sep 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
with:
config: './.markdownlint.yaml'
args: '.'
- name: Verify links
- name: Verify internal links
run: ./hack/verify-links.sh
- name: Verify link anchors
- name: Verify internal link anchors
run: ./hack/verify-link-anchors.sh
- name: "Check unclosed tags"
run:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/link-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: external-link-check

on: [pull_request]

jobs:
base:
runs-on: ubuntu-18.04
steps:
- name: Check out code
uses: actions/checkout@v2

# NOTE:
# - the check process can be very fast,
# but if `-c` is too large then `Too Many Requests (HTTP error 429)` may be reported from `https://github.com/*`.
# - we hardcode `--document-root` to `/github/workspace` in the container now.
# - we use `http://172.*` as sample addresses in some docs, so we need to exclude them.
- name: Check external links in zh files
uses: peter-evans/link-checker@v1
with:
args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" zh*

- name: Check external links in en files
id: lc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请教下,上面的「Check external links in zh files」那一步没有 id,如果只有 zh 有 error、en 没有 error,下面的 ${{ steps.lc.outputs.exit_code }} 会是 1 吗? @csuzhangxc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

啊。我的错误,都需要加 id、都需要判断

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯嗯,学程哥帮忙提个 pr 改下?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#370 PTAL

uses: peter-evans/link-checker@v1
with:
args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" en*

- name: Fail if there were external link errors
if: ${{ steps.lc.outputs.exit_code }}
run: |
echo "Please check the broken links reported in previous steps \"Check external links in zh files\" and \"Check external links in en files\"."
exit ${{ steps.lc.outputs.exit_code }}

# Debug via SSH if previous steps failed
#- name: Set up tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v2
2 changes: 1 addition & 1 deletion en/maintain-dm-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Execute `tiup list dm-master` to view the latest cluster version supported by Ti

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

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.
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.
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.

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.
Expand Down