Skip to content

Markdown Link Check #65

Markdown Link Check

Markdown Link Check #65

name: Markdown Link Check
on:
schedule:
- cron: '30 1 * * 1' # 毎週月曜日の1:30(UTC) -> 毎週月曜日の10:30(JST)
workflow_dispatch:
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Check links
run: |
npm install -g markdown-link-check
find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check
- name: Notify Slack
if: ${{ failure() }}
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: ":x: Markdown link check failed. See the details at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
author_name: Link Checker
fields: repo,commit,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}