From 157a379829d0a374ad069caf226572155191a600 Mon Sep 17 00:00:00 2001 From: pb <5535435+pekth@users.noreply.github.com> Date: Wed, 4 Nov 2026 04:32:27 -0500 Subject: [PATCH 1/2] feat(links): add root-dir input for root-relative links Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/links.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 2a15cf9..f409f04 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -8,6 +8,12 @@ on: description: lychee arguments, including the file globs to check. type: string default: "--verbose --no-progress '*.html' '*.md'" + root-dir: + description: >- + Directory that root-relative links (href="/x") resolve against, relative + to the repository root. Empty keeps lychee's default. + type: string + default: "" runner: type: string default: instabox-medium @@ -28,4 +34,4 @@ jobs: persist-credentials: false - uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 with: - args: ${{ inputs.args }} + args: ${{ inputs.root-dir != '' && format('--root-dir {0}/{1} ', github.workspace, inputs.root-dir) || '' }}${{ inputs.args }} From b394f2d0d05ff8060b46638bbc23660b0bd5bb2b Mon Sep 17 00:00:00 2001 From: pb <5535435+pekth@users.noreply.github.com> Date: Wed, 4 Nov 2026 04:32:39 -0500 Subject: [PATCH 2/2] docs(links): document root-dir input Co-Authored-By: Claude Sonnet 5.5 --- docs/USAGE.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/USAGE.md b/docs/USAGE.md index ea5c5bf..6548e10 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -15,7 +15,7 @@ jobs: | Workflow | What it does | Main inputs | Secrets | | --- | --- | --- | --- | | `node-ci.yml` | Jobs `Install`, then parallel `Lint`, `Typecheck`, `Test`, then `Build`. Empty input skips that job. | `node-version`, `package-manager`, `working-directory`, `install`, `lint`, `typecheck`, `test`, `build`, `runner` | none | -| `links.yml` | Link check with lychee. | `args`, `runner` | none | +| `links.yml` | Link check with lychee. | `args`, `root-dir`, `runner` | none | | `changes.yml` | Job `Changes`. Output `code` is `true` unless only ignored files changed. | `ignore`, `runner` | none | | `security.yml` | Parallel jobs `Secret scan` (gitleaks CLI) and `Dependency audit`. | `secret-scan`, `audit`, `audit-level`, `working-directory`, `runner` | none | | `deploy-cpanel.yml` | Job `Deploy` (cPanel Git pull), then `Verify live` (HTTP 200 and byte compare). | `trigger`, `cpanel-repo`, `branch`, `host` (required), `verify-url`, `live-base-url`, `live-files`, `runner` | `CPANEL_USER`, `CPANEL_PASSWORD` | @@ -168,3 +168,16 @@ jobs: For a single package, drop the matrix and the `working-directory` line. The caller job is then one box named `CI`. When a caller job skips (docs-only), `gate` still passes and only `Changes`, `CI gate` and `Announce` run. `Deploy site` skips too, because `code` is not `true`. + +### Link check for static sites + +Root-relative links (`href="/about/"`) resolve against `root-dir`, a path relative to the repository root. Leave it empty for repositories without root-relative links. + +```yaml +jobs: + links: + uses: tilorahdotco/.github/.github/workflows/links.yml@ + with: + root-dir: . + args: --verbose --no-progress --exclude-mail '**/*.html' +```