Skip to content

chore: check for invalid markdown links in docs weekly #6795

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

Merged
merged 13 commits into from
Apr 7, 2023
30 changes: 30 additions & 0 deletions .github/workflows/cron-weekly.yaml
Original file line number Diff line number Diff line change
@@ -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 }}