mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: check for invalid markdown links in docs weekly (#6795)
* chore(ci): add an automatic check to verify markdown links.
As per #6793, there are multiple broken links in our docs. This action will check if all markdown links are valid.
cc: @ammario @bpmct
* Revert "chore(ci): add an automatic check to verify markdown links. "
This reverts commit 294767e056.
* Create cron-weekly.yaml
* add workflow dispatch for testing
* fmt
* Update cron-weekly.yaml
* remove slack notification for now
* Add slack notification
* Update cron-weekly.yaml
* Add logs URL
* fmt
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
name: Markdown Links Check
|
||||
# runs every monday at 9 am
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 9 * * 1"
|
||||
workflow_dispatch: # allows to run manually for testing
|
||||
|
||||
jobs:
|
||||
check-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Check Markdown links
|
||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
id: markdown-link-check
|
||||
# checks all markdown files from /docs including all subfolders
|
||||
with:
|
||||
use-quiet-mode: "yes"
|
||||
use-verbose-mode: "yes"
|
||||
config-file: ".github/workflows/markdown.links.config.json"
|
||||
folder-path: "docs/"
|
||||
|
||||
- name: Send Slack notification
|
||||
run: |
|
||||
curl -X POST -H 'Content-type: application/json' -d '{"msg":"Broken links found in the documentation. Please check the logs at ${{ env.LOGS_URL }}"}' ${{ secrets.DOCS_LINK_SLACK_WEBHOOK }}
|
||||
echo "Sent Slack notification"
|
||||
env:
|
||||
LOGS_URL: ${{ https://github.com/coder/coder/actions/runs/${{ github.run_id }}
|
||||
Reference in New Issue
Block a user