Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

A GitHub Action that checks for the presence of broken links

License

Notifications You must be signed in to change notification settings

hashicorp/gh-action-check-broken-links

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

HashiCorp's Link Checker

C/I Status

A GitHub Action that reports all broken links found within a set of provided .mdx files

  • ⚠️ Currently only supports .mdx files
  • ⚠️ Assumes a Next.js project structure (i.e. links resolve from the /pages directory)

Features

Parses .mdx files, locating all links. Reports back any failed requests including those that contain a fragment identifier (i.e. https://example.com/page#identifier) but whose resulting markup does not.

Example Usage

- name: HashiCorp's Link Checker
  uses: hashicorp/gh-action-check-broken-links@v1
  with:
    baseUrl: 'https://hashicorp.com'
    files: 'pages/foo.mdx pages/bar.mdx'
    whitelist: |
      https://google.com/whitelist
      https://yahoo.com/whitelist