feat: add link check (#635)

Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
diff --git a/.github/actions/markdown-link-check b/.github/actions/markdown-link-check
new file mode 160000
index 0000000..9710f0f
--- /dev/null
+++ b/.github/actions/markdown-link-check
@@ -0,0 +1 @@
+Subproject commit 9710f0fec812ce0a3b98bef4c9d842fc1f39d976
diff --git a/.github/workflows/lint-checker.yml b/.github/workflows/lint-checker.yml
index 44ecc5f..b9e81e1 100644
--- a/.github/workflows/lint-checker.yml
+++ b/.github/workflows/lint-checker.yml
@@ -91,3 +91,23 @@
           node-version: '12.x'
       - run: npm install -g markdownlint-cli@0.25.0
       - run: markdownlint '**/*.md' --ignore node_modules --ignore CHANGELOG.md
+  markdown-link-check:
+    needs: changes
+    if: |
+      (needs.changes.outputs.docs == 'true')
+    runs-on: ubuntu-latest
+    name: Check Markdown links
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: recursive
+      - uses: ./.github/actions/markdown-link-check
+        with:
+          use-quiet-mode: 'yes'
+          use-verbose-mode: 'yes'
+          config-file: 'link-check-config.json'
+          folder-path: 'docs/en'
+          file-path: './README.md, ./install.md, ./test/e2e/README.md'
+          max-depth: -1
+          file-extension: ".md"
+          check-modified-files-only: "no"
diff --git a/.gitmodules b/.gitmodules
index c4f5dbb..f2d43b0 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -19,3 +19,6 @@
 [submodule ".github/actions/paths-filter"]
 	path = .github/actions/paths-filter
 	url = https://github.com/dorny/paths-filter.git
+[submodule ".github/actions/markdown-link-check"]
+	path = .github/actions/markdown-link-check
+	url = https://github.com/gaurav-nelson/github-action-markdown-link-check.git
diff --git a/README.md b/README.md
index 1c605fc..4062417 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,8 @@
 
 Use [Apache APISIX](https://github.com/apache/apisix#apache-apisix) for Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/).
 
-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.
+All configurations in `apisix-ingress-controller` are defined with Kubernetes CRDs (Custom Resource Definitions).
+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.
 
 `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.
 
@@ -64,7 +65,7 @@
 ## Apache APISIX Ingress vs. Kubernetes Ingress Nginx
 
 * Hot-reload during yaml apply.
-* [More convenient canary deployment.](./docs/assets/en/latest/concepts/apisix_route.md)
+* [More convenient canary deployment.](./docs/en/latest/concepts/apisix_route.md)
 * Verify the correctness of the configuration, safe and reliable.
 * [Rich plugins and ecology.](https://github.com/apache/apisix/tree/master/docs/en/latest/plugins)
 * Supports APISIX custom resources and Kubernetes native Ingress resources.
diff --git a/link-check-config.json b/link-check-config.json
new file mode 100644
index 0000000..12cb61b
--- /dev/null
+++ b/link-check-config.json
@@ -0,0 +1,32 @@
+{
+  "ignorePatterns": [
+    {
+      "pattern": "^https://github.com/.*?/issue"
+    },
+    {
+      "pattern": "^https://github.com/.*?/pull"
+    },
+    {
+      "pattern": "^#"
+    }
+  ],
+  "replacementPatterns": [
+    {
+      "pattern": "^https://github.com/apache/apisix-ingress-controller/blob/master/",
+      "replacement": "{{BASEURL}}/"
+    },
+    {
+      "pattern": "^https://github.com/apache/apisix-ingress-controller/tree/master/",
+      "replacement": "{{BASEURL}}/"
+    },
+    {
+      "pattern": "^https://apisix.apache.org/docs/ingress-controller/(.*?)$",
+      "replacement": "{{BASEURL}}/docs/en/latest/$1.md"
+    }
+  ],
+  "timeout": "20s",
+  "retryOn429": true,
+  "retryCount": 5,
+  "fallbackRetryDelay": "30s",
+  "aliveStatusCodes": [200, 206]
+}