Skip to content

ci: fix broken vnu download and linkedin link-check 404#2

Merged
savvides merged 1 commit intomainfrom
fix/ci-flakes
Apr 27, 2026
Merged

ci: fix broken vnu download and linkedin link-check 404#2
savvides merged 1 commit intomainfrom
fix/ci-flakes

Conversation

@savvides
Copy link
Copy Markdown
Owner

Summary

Both CI jobs ("Validate HTML" and "Check Links") have been red on main since at least the v2.1.0 docs sync (2026-04-25). Two unrelated infra issues, both fixed here in one workflow file.

Validate HTML

Was downloading vnu from:

https://github.com/validator/validator/releases/latest/download/vnu.jar_dist.zip

The validator project doesn't publish GitHub Releases (only tags), so the URL 404s and unzip exits 9 before vnu ever runs. Confirmed via gh api repos/validator/validator/releases returning [].

Replaced with the official vnu-jar npm package (v26.4.16, published 2026-04-16 by the same project). It bundles vnu.jar and exposes it at a stable path: node_modules/vnu-jar/build/dist/vnu.jar. Verified locally that npm install --no-save vnu-jar lands the jar at exactly that path. Also dropped the apt install of default-jre because ubuntu-latest runners ship with Java preinstalled.

Check Links

The lychee link checker hits https://www.linkedin.com/in/savvides/ (legitimate footer link added in 7df0451) and gets a 404 because LinkedIn returns 404 for unauthenticated profile requests from non-browser user agents. Added --exclude linkedin.com to the lychee args.

Diff

-      - name: Install vnu
-        run: |
-          sudo apt-get update -qq
-          sudo apt-get install -y -qq default-jre
-          curl -sL https://github.com/validator/validator/releases/latest/download/vnu.jar_dist.zip -o vnu.zip
-          unzip -q vnu.zip
+      - name: Install vnu-jar
+        run: npm install --no-save vnu-jar

       - name: Validate HTML
-        run: java -jar dist/vnu.jar --errors-only index.html
+        run: java -jar node_modules/vnu-jar/build/dist/vnu.jar --errors-only index.html
...
-          args: --exclude fonts.googleapis.com --exclude fonts.gstatic.com --exclude d3js.org --exclude localhost ...
+          args: --exclude fonts.googleapis.com --exclude fonts.gstatic.com --exclude d3js.org --exclude linkedin.com --exclude localhost ...

Test plan

  • CI runs on this PR. Both jobs should now go green.
  • After merge, confirm the next push to main shows green CI for the first time since v2.1.0.

🤖 Generated with Claude Code

…kedin

The vnu install was downloading from
github.com/validator/validator/releases/latest/download/vnu.jar_dist.zip,
which 404s — the validator project does not publish GitHub releases, only
tags. The download has been broken since at least 2026-04-25.

Switch to the official vnu-jar npm package (currently v26.4.16, published
2026-04-16). It bundles vnu.jar directly and lives at a stable known
path under node_modules. No more apt install of default-jre either —
ubuntu-latest runners ship with Java preinstalled.

Also exclude linkedin.com from the lychee link checker. LinkedIn returns
404 for unauthenticated profile fetches, so the legitimate footer link to
linkedin.com/in/savvides was failing CI on every PR that touched
index.html.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@savvides savvides merged commit d441806 into main Apr 27, 2026
2 checks passed
@savvides savvides deleted the fix/ci-flakes branch April 27, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant