Skip to content

Commit d537ddc

Browse files
authored
feat: add link check (#635)
Signed-off-by: Ling Samuel <[email protected]>
1 parent d7128a1 commit d537ddc

File tree

5 files changed

+59
-2
lines changed

5 files changed

+59
-2
lines changed

.github/actions/markdown-link-check

Submodule markdown-link-check added at 9710f0f

.github/workflows/lint-checker.yml

+20
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,23 @@ jobs:
9191
node-version: '12.x'
9292
- run: npm install -g [email protected]
9393
- run: markdownlint '**/*.md' --ignore node_modules --ignore CHANGELOG.md
94+
markdown-link-check:
95+
needs: changes
96+
if: |
97+
(needs.changes.outputs.docs == 'true')
98+
runs-on: ubuntu-latest
99+
name: Check Markdown links
100+
steps:
101+
- uses: actions/checkout@v2
102+
with:
103+
submodules: recursive
104+
- uses: ./.github/actions/markdown-link-check
105+
with:
106+
use-quiet-mode: 'yes'
107+
use-verbose-mode: 'yes'
108+
config-file: 'link-check-config.json'
109+
folder-path: 'docs/en'
110+
file-path: './README.md, ./install.md, ./test/e2e/README.md'
111+
max-depth: -1
112+
file-extension: ".md"
113+
check-modified-files-only: "no"

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@
1919
[submodule ".github/actions/paths-filter"]
2020
path = .github/actions/paths-filter
2121
url = https://github.com/dorny/paths-filter.git
22+
[submodule ".github/actions/markdown-link-check"]
23+
path = .github/actions/markdown-link-check
24+
url = https://github.com/gaurav-nelson/github-action-markdown-link-check.git

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
Use [Apache APISIX](https://github.com/apache/apisix#apache-apisix) for Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/).
2525

26-
All configurations in `apisix-ingress-controller` are defined with Kubernetes CRDs (Custom Resource Definitions). Such as configure [plugins](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins.md), Support service registration discovery mechanism for upstreams, load balancing and more in Apache APISIX.
26+
All configurations in `apisix-ingress-controller` are defined with Kubernetes CRDs (Custom Resource Definitions).
27+
Support configuring [plugins](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins), service registration discovery mechanism for upstreams, load balancing and more in Apache APISIX.
2728

2829
`apisix-ingress-controller` is an Apache APISIX control plane component. Currently it serves for Kubernetes clusters. In the future, we plan to separate the submodule to adapt to more deployment modes, such as virtual machine clusters.
2930

@@ -64,7 +65,7 @@ From the version 1.0.0, APISIX-ingress-controller need to work with Apache APISI
6465
## Apache APISIX Ingress vs. Kubernetes Ingress Nginx
6566

6667
* Hot-reload during yaml apply.
67-
* [More convenient canary deployment.](./docs/assets/en/latest/concepts/apisix_route.md)
68+
* [More convenient canary deployment.](./docs/en/latest/concepts/apisix_route.md)
6869
* Verify the correctness of the configuration, safe and reliable.
6970
* [Rich plugins and ecology.](https://github.com/apache/apisix/tree/master/docs/en/latest/plugins)
7071
* Supports APISIX custom resources and Kubernetes native Ingress resources.

link-check-config.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^https://github.com/.*?/issue"
5+
},
6+
{
7+
"pattern": "^https://github.com/.*?/pull"
8+
},
9+
{
10+
"pattern": "^#"
11+
}
12+
],
13+
"replacementPatterns": [
14+
{
15+
"pattern": "^https://github.com/apache/apisix-ingress-controller/blob/master/",
16+
"replacement": "{{BASEURL}}/"
17+
},
18+
{
19+
"pattern": "^https://github.com/apache/apisix-ingress-controller/tree/master/",
20+
"replacement": "{{BASEURL}}/"
21+
},
22+
{
23+
"pattern": "^https://apisix.apache.org/docs/ingress-controller/(.*?)$",
24+
"replacement": "{{BASEURL}}/docs/en/latest/$1.md"
25+
}
26+
],
27+
"timeout": "20s",
28+
"retryOn429": true,
29+
"retryCount": 5,
30+
"fallbackRetryDelay": "30s",
31+
"aliveStatusCodes": [200, 206]
32+
}

0 commit comments

Comments
 (0)