lychee-action

Github action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.

APACHE-2.0 License

Stars
259
Committers
30

Bot releases are hidden (Show)

lychee-action - Version 1.3.0

Published by mre over 2 years ago

Update lychee bin to 0.8.2, with directory support.

This will be the default in the next major version, but can already be tested with the following config:

- name: Link Checker
  uses: lycheeverse/[email protected]
  with:
    # Recursively check all supported files (html, markdown for now) in repo
    args: --verbose --no-progress .

lychee supports plaintext files as well as many other formats, but as of now lychee . is conservative and
will only check HTML and Markdown files. So it should be a safe replacement for the current default:
'./**/*.md' './**/*.html'. It should also be faster and will use less file-handles than glob patterns.

Other highlights of lychee 0.8.2:

Especially the .lycheeignore part should be helpful for folks that used workarounds like custom ignore files before.
This is now a native feature of lychee. See https://github.com/lycheeverse/lychee/issues/308 for more info.

Full lychee 0.8.2 changelog here.

lychee-action - Version 1.2.1

Published by mre over 2 years ago

Fix evaluating glob patterns

Glob patterns were not properly evaluated for three reasons:

  1. Quotes around globs were not preserved. As a result, unquoted wildcards were evaluated by bash instead of lychee
  2. ** patterns handled by the glob crate need to be prefixed with a separator, e.g. ./. See code here and here. We should probably switch to globset at some point, which doesn't have that limitation.
  3. The lychee command itself needs to be executed with eval to make it find links. Otherwise it interprets the input argument (${ARGS[@]}) as a string and tries to find links within that string. (String input is supported by lychee). We want to interpret it as individual (whitespace-separated) arguments however. (Note that Github Actions doesn't support arrays as inputs, which prevents us from using array splitting.)

Recommended usage inside pipelines: Surround glob patterns with single quotes and prefix them with ./.

- name: Link Checker
  uses: lycheeverse/[email protected]
  with:
    # Check all Markdown and HTML files
    args: --verbose --no-progress './**/*.md' './**/*.html'

For more context, see #67 and #68.
The examples have been updated accordingly.

lychee-action - Version 1.2.0

Published by mre almost 3 years ago

New inputs

Input Example Description
format json Use json as output format (instead of markdown)
output /tmp/foo.json Use different output filename
fail true Fail action on broken links

Full example config

- name: Link Checker
  uses: lycheeverse/[email protected]
  with:
    # Check all markdown and html files in repo (default)
    args: --verbose --no-progress **/*.md **/*.html
    # Use json as output format (instead of markdown)
    format: json
    # Use different output filename
    output: /tmp/foo.txt
    # Fail action on broken links
    fail: true
lychee-action -

Published by mre almost 3 years ago

Update to lychee 0.8.1 with support for markdown output.
See https://github.com/lycheeverse/lychee/releases/tag/v0.8.1 for changelog.

lychee-action - Version 1.1.0

Published by mre almost 3 years ago

Update to lychee 0.8.0 with local file support and more.
See https://github.com/lycheeverse/lychee/releases/tag/v0.8.0 for changelog.

lychee-action - Version 1.0.9

Published by mre about 3 years ago

  • Pin lychee version to specific SHA. This avoids breaking changes when lychee@master gets updated. (See #19)
lychee-action - Version 1.0.8

Published by mre over 3 years ago

  • prepend output option #23 by @ltalirz
lychee-action - Version 1.0.7

Published by mre over 3 years ago

lychee-action - Version 1.0.6

Published by mre over 3 years ago

Rename to Lychee Broken Link Checker

lychee-action - Version 1.0.5

Published by mre over 3 years ago

lychee-action - Version 1.0.4

Published by mre over 3 years ago

Bugfixes concerning issue creation

lychee-action - Version 1.0.3

Published by mre almost 4 years ago

Handle all error codes (not just 1)

lychee-action - Version 1.0.2

Published by mre almost 4 years ago

Use --output flag for more robust output parsing from lychee.

lychee-action - Version 1.0.1

Published by mre almost 4 years ago

Bugfixes

lychee-action - Version 1.0.0

Published by mre almost 4 years ago

First release of the lychee Github action — an action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.

Package Rankings
Top 0.93% on Github actions
Badges
Extracted from project README
GitHub Marketplace Check Links Check Links
Related Projects