Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add docs-links-check ci and fix dead links #93

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 33 additions & 0 deletions .github/workflows/docs-links-check-pr.yml
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'
23 changes: 23 additions & 0 deletions .github/workflows/docs-links-check.yml
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
16 changes: 16 additions & 0 deletions .github/workflows/docs.links.check.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"ignorePatterns": [
{
"pattern": "^[^h]"
Copy link

Choose a reason for hiding this comment

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

If it is necessary to exclude strings starting with http or https, you can make the regular expression more specific to avoid matching other strings starting with 'h', such as 'help' ...

},
{
"pattern": "^http://localhost"
},
{
"pattern": "^http://yourip"
},
{
"pattern": "^http://your-ip"
}
]
}
2 changes: 1 addition & 1 deletion docs/bt-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ nohup ./main &
```
Next visit **http://your-ip:7000**, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode.

For more settings please see [Casnode.](https://casnode.org/docs)
For more settings please see [casnode.org](https://casnode.org/docs/overview).

2 changes: 1 addition & 1 deletion docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ docker-compose up

Next visit http://your-ip:7000, click login, enter the account you added before, user_1/123, you have now successfully logged in to Casnode.

More settings reference [casnode.](https://casnode.org/docs)
More settings reference [casnode.org](https://casnode.org/docs/overview).

2 changes: 1 addition & 1 deletion docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ casdoorDbName = casdoor
:::tip

Casdoor's `driverName` and `dataSourceName` are the same as casnode by default. If your Casdoor and Casnode are not
in the same database, you can set up the casdoor database in [casdoor/adapter.go](https://github.com/casbin/casnode/casdoor/adapter.go)
in the same database, you can set up the casdoor database in [casdoor/adapter.go](https://github.com/casbin/casnode/blob/master/casdoor/adapter.go)

Here we provide an example:

Expand Down
Loading