A happy little GitHub Action that checks your README.md and other markdown for broken links.
With no arguments, this will scan your README.md in the root of the GitHub repository:
on:
push:
branches:
- main
pull_request:
name: ci
jobs:
linkinator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: step-security/linkinator-action@v1Or you can do below
on:
push:
branches:
- main
pull_request:
name: ci
jobs:
linkinator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: step-security/linkinator-action@v1
with:
paths: test/fixtures/test.md
concurrency: 1
markdown: true
linksToSkip: "http://fake.local, http://fake.local/fake"paths- Paths to scan for 404s. Defaults to*.md.config- Path to a config file to use. Looks forlinkinator.config.jsonby default. Options defined via the GitHub Action config will take precedence.concurrency- The number of connections to make simultaneously. Defaults to100.recurse- Recursively follow links on the same root domain. Defaults tofalse.linksToSkip- List of urls in regexy form to not include in the check. (skipis also accepted)timeout- Request timeout in ms. Defaults to 0 (no timeout).markdown- Automatically parse and scan markdown if scanning from a location on disk. Defaults totrue.serverRoot- When scanning a local directory, customize the location on disk where the server is started. Defaults to the root of your GitHub repository.directoryListing- Include an automatic directory index file when linking to a directory. Defaults tofalse.retry- Automatically retry requests that return HTTP 429 responses and include aretry-afterheader.urlRewriteSearch- Pattern to search for in urls. Must be used withurlRewriteReplace.urlRewriteReplace- Expression used to replace search content. Must be used withurlRewriteSearch.verbosity- Override the default verbosity for this command. Available options are "DEBUG", "INFO", "WARNING", "ERROR", and "NONE". Defaults to "WARNING".
results- An object with the results of the run.
To view skipped links, failure details, and more debugging information enable step debug logging.
