Skip to content
hashicorp

GitHub Action

HashiCorp's Link Checker

v1 Latest version
Use latest version
hashicorp

HashiCorp's Link Checker

Report broken links found in a given set of files

Installation

Copy and paste the following snippet into your .yml file.

- name: HashiCorp's Link Checker
  uses: hashicorp/gh-action-check-broken-links@v1
Learn more about this action in hashicorp/gh-action-check-broken-links
Choose a version

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