name: Check Markdown links

on:
  push:
    paths:
      - '**.md'
      - .github/workflows/check-md-links.yml

  schedule:
    # The markdown files are not frequently modified. So run the job at least
    # once every week.
    - cron: '30 1 * * TUE'

jobs:
  markdown-link-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: gaurav-nelson/github-action-markdown-link-check@v1
        with:
          config-file: '.github/mlc_config.json'
