Releases: marccampbell/hugo-linkcheck-action
v0.1.3
- Updated instructions
v0.1.2
Use Hugo 0.53 when crawling for broken links.
Update base image from node 8.15.0 to 8.15.1
v0.1.1
Hugo LinkCheck Action
This action runs a Hugo site and crawls it, looking for broken links. Any broken links will be reported back as a comment on the Pull Request.
Usage
workflow "Hugo Link Check" {
resolves = "linkcheck"
on = "pull_request"
}
action "filter-to-pr-open-synced" {
uses = "actions/bin/filter@master"
args = "action 'opened|synchronize'"
}
action "linkcheck" {
uses = "docker://marc/hugo-linkcheck:v0.1.1"
needs = "filter-to-pr-open-synced"
secrets = ["GITHUB_TOKEN"]
env = {
HUGO_FINAL_URL = "https://mysite.com"
}
}
Notice: Please use a release tag, not master to use a stable version.
Environment Variables
HUGO_ACTION_COMMENT
: (defaults to "true") Disable to prevent adding the results as a comment on the pull request
HUGO_STARTUP_WAIT
: (defaults to 15). Number of seconds to wait for hugo serve to be ready locally.
HUGO_EXCLUSIONS_LIST
: (defaults to ".github/hugo-linkcheck-actions/exclusions.json"). Path to a JSON file containing links to ignore. Wildcards are supported.
HUGO_CONFIG
: (defaults to "./config.toml"). Path to hugo config to use when running hugo serve.
HUGO_ROOT
: (defaults to "."): Path to hugo root directory.
HUGO_CONTENT_ROOT
: (defaults to "./content"). Path to directory that post content is stored in.
HUGO_FINAL_URL
: (defaults to "http://localhost:1313"). This will be the root URL used in the pull request comment to ensure the links are clickable.
Secrets
In order to make Pull Request commenting work, please pass the "GITHUB_TOKEN" secret to the action.
Arguments
None.
v0.1.0
Hugo LinkCheck Action
This action runs a Hugo site and crawls it, looking for broken links. Any broken links will be reported back as a comment on the Pull Request.
Usage
workflow "Hugo Link Check" {
resolves = "linkcheck"
on = "pull_request"
}
action "filter-to-pr-open-synced" {
uses = "actions/bin/filter@master"
args = "action 'opened|synchronize'"
}
action "linkcheck" {
uses = "docker://marc/hugo-linkcheck:v0.1.0"
needs = "filter-to-pr-open-synced"
secrets = ["GITHUB_TOKEN"]
env = {
HUGO_FINAL_URL = "https://mysite.com"
}
}
Notice: Please use a release tag, not master to use a stable version.
Environment Variables
HUGO_ACTION_COMMENT
: (defaults to "true") Disable to prevent adding the results as a comment on the pull request
HUGO_STARTUP_WAIT
: (defaults to 15). Number of seconds to wait for hugo serve to be ready locally.
HUGO_EXCLUSIONS_LIST
: (defaults to ".github/hugo-linkcheck-actions/exclusions.json"). Path to a JSON file containing links to ignore. Wildcards are supported.
HUGO_CONFIG
: (defaults to "./config.toml"). Path to hugo config to use when running hugo serve.
HUGO_ROOT
: (defaults to "."): Path to hugo root directory.
HUGO_CONTENT_ROOT
: (defaults to "./content"). Path to directory that post content is stored in.
HUGO_FINAL_URL
: (defaults to "http://localhost:1313"). This will be the root URL used in the pull request comment to ensure the links are clickable.
Secrets
In order to make Pull Request commenting work, please pass the "GITHUB_TOKEN" secret to the action.
Arguments
None.