GitHub Marketplace

Usage

Basic

name: Check markdown links

on: push

jobs:
  markdown-link-check:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master

    - uses: gaurav-nelson/github-action-markdown-link-check@v1

Scheduled

name: Check Markdown links

on:
  push:
    branches:
    - master

  schedule:
  - cron: "0 9 * * *"

jobs:
  markdown-link-check:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master

    - uses: gaurav-nelson/github-action-markdown-link-check@v1
      with:
        use-quiet-mode: 'yes'
        use-verbose-mode: 'yes'
        config-file: 'mlc_config.json'
        folder-path: 'docs/markdown_files'

On Pull Request

on: [pull_request]

name: Check links for modified files

jobs:
  markdown-link-check:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master

    - uses: gaurav-nelson/github-action-markdown-link-check@v1
      with:
        use-quiet-mode: 'yes'
        use-verbose-mode: 'yes'
        check-modified-files-only: 'yes'

Options

Check the marketplace page for full details.

Here are few:

  • use-quiet-mode - Specify yes to only show errors in output.
  • use-verbose-mode - Specify yes to show detailed HTTP status for checked links.
  • folder-path - Target folder e.g. "docs".

Disable

Next line

<!-- markdown-link-check-disable-next-line -->
[Text](target)

Current line

[Text](target) <!-- markdown-link-check-disable-line -->

Between lines

<!-- markdown-link-check-disable -->
[Text](target)

<!-- markdown-link-check-enable-->