Skip to content

Fix the Jekyll CI workflows - #50

Merged
jowens merged 1 commit into
mainfrom
ci-jekyll-workflows
Aug 31, 2026
Merged

Fix the Jekyll CI workflows#50
jowens merged 1 commit into
mainfrom
ci-jekyll-workflows

Conversation

@jowens

@jowens jowens commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Two complementary bugs in the Jekyll workflows: the workflow that builds the site correctly can't run on branches without failing, and the one that does run on branches doesn't build the site correctly.

Noticed while opening #48 and #49, which both show a red deploy X that has nothing to do with their contents.

1. The deploy workflow runs where it cannot succeed

jekyll.yml triggered on every push with no branch filter:

on:
  push:
  workflow_dispatch:

GitHub Pages only accepts deployments from the configured source branch, so deploy fails on every feature branch. The history is unambiguous:

branch result
mobile-demo-followups failure
mobile-docs failure
main × 13 success

It also parked those runs in the shared concurrency: group: "pages", where they can queue against a real main deploy.

Now restricted to main.

2. The branch check builds the wrong thing

main.yml ("Test Jekyll Build") ran:

bundle exec jekyll build --source docs --baseurl "/gridwise"

That is not how the site is assembled. _config.yml treats the repo root as the source and only points layouts_dir/includes_dir into docs/. Building from docs/ skips the root-level assets/ directory entirely:

assets/css/style.css emitted pages link to it
root build (deploy workflow) ✅ 12286 bytes /gridwise/assets/css/style.css
--source docs (this check) never emitted /gridwise/assets/css/style.css

So the check green-lit a site whose stylesheet does not exist, and could not catch a broken one. Verified by appending a deliberate syntax error to style.scss:

bundle exec jekyll build --source docs   -> exit 0   (passed)
bundle exec jekyll build                 -> exit 1   (failed)

This matters right now: #48 consists entirely of changes to assets/css/style.scss. Its green tick from this workflow proved nothing about them. The only thing that actually validated that PR was the build job inside jekyll.yml — the job whose sibling deploy produces the red X. So fixing bug 1 alone would have removed #48's only real coverage; the two changes have to land together.

3. Two smaller items

  • Ruby drift: this check pinned 3.2 while deploy pins 3.3. Now both 3.3, so the PR check runs against the Ruby the published site is built with.
  • Duplicate runs: it triggered on both push and pull_request, so a same-repo PR branch built twice per commit. Now pull_request plus push on main.

Verification

Both files parse as valid YAML with the intended triggers. The new build command emits style.css (12286 bytes) and exits 0 on a healthy tree, and exits 1 with a broken stylesheet — i.e. the check now fails when it should, which it previously did not.

Suggested merge order

This one first, then #48 and #49 — that way both of those get a Jekyll check that actually compiles the stylesheet, and stop showing a spurious failure.

🤖 Generated with Claude Code

Two complementary bugs: the workflow that builds the site correctly
cannot run on branches without failing, and the one that does run on
branches does not build the site correctly.

Deploy Jekyll site to Pages triggered on every push with no branch
filter. GitHub Pages only accepts deployments from the configured
source branch, so the deploy job failed on every feature branch - a
guaranteed red X on every PR - while also parking those runs in the
shared "pages" concurrency group alongside real main deploys. History:
main succeeded 13 times, every feature branch failed. Now restricted to
main.

Test Jekyll Build built with `--source docs`, which is not how the site
is assembled: _config.yml treats the repo root as the source and only
points layouts_dir/includes_dir into docs/. Building from docs/ skipped
the root-level assets/ directory, so assets/css/style.scss was never
compiled and assets/css/style.css was never emitted - while every
generated page still linked to it.

That made the branch check incapable of catching a broken stylesheet.
Verified by appending a deliberate syntax error to style.scss:

  bundle exec jekyll build --source docs   -> exit 0  (passed)
  bundle exec jekyll build                 -> exit 1  (failed)

It now builds from the root, so the check exercises what actually
ships. This matters immediately: PR #48 consists entirely of changes to
assets/css/style.scss, and its green tick from this workflow proved
nothing about them.

Also aligned Ruby to 3.3 to match the deploy workflow, and restricted
push to main since the workflow already runs on pull_request - a
same-repo PR branch was building twice per commit.

Verified: both files parse, the new build command emits style.css
(12286 bytes) and exits 0 on a healthy tree, and exits 1 with a broken
stylesheet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jowens
jowens merged commit 87531fa into main Aug 31, 2026
2 checks passed
@jowens
jowens deleted the ci-jekyll-workflows branch August 31, 2026 03:53
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