-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add docs-links-check ci and fix dead links (#93)
This ci will run every saturday at 12:00 UTC This ci can be manually triggered on the [Action page](https://github.com/casnode/casnode-website/actions/workflows/docs-links-check.yml) When modifying or adding docs in PR, the ci will run to check whether there is a dead link. `docs.links.check.config.json` is the config file of this ci, refer to https://github.com/tcort/markdown-link-check#config-file-format . There are ignorePatterns in the file for ignoring some links, for example: ```md [](overview) [](/img/casbin.png) [](http://localhost:8000) ```
- Loading branch information
1 parent
5448687
commit 2b2e8ef
Showing
6 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Check links for modified docs | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'docs/**' | ||
|
||
jobs: | ||
docs-links-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@master | ||
|
||
- name: Check links for mdx files 🔎 | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
use-quiet-mode: 'yes' # only show errors in output. | ||
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links. | ||
# refer to https://github.com/tcort/markdown-link-check#config-file-format | ||
config-file: '.github/workflows/docs.links.check.config.json' | ||
check-modified-files-only: 'yes' | ||
file-extension: '.mdx' | ||
|
||
- name: Check links for markdown files 🔎 | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
use-quiet-mode: 'yes' # only show errors in output. | ||
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links. | ||
# refer to https://github.com/tcort/markdown-link-check#config-file-format | ||
config-file: '.github/workflows/docs.links.check.config.json' | ||
check-modified-files-only: 'yes' | ||
file-extension: '.md' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Docs Links Check | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 12 * * 6" # runs every saturday at 12:00 UTC | ||
|
||
jobs: | ||
docs-links-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@master | ||
|
||
- name: Check Links 🔎 | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
use-quiet-mode: 'yes' # only show errors in output. | ||
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links. | ||
folder-path: 'docs/' # only check the docs/ folder | ||
# refer to https://github.com/tcort/markdown-link-check#config-file-format | ||
config-file: '.github/workflows/docs.links.check.config.json' | ||
file-extension: '.md*' # .md or .mdx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "^[^h]" | ||
}, | ||
{ | ||
"pattern": "^http://localhost" | ||
}, | ||
{ | ||
"pattern": "^http://yourip" | ||
}, | ||
{ | ||
"pattern": "^http://your-ip" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters