Fix the Jekyll CI workflows - #50
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
deployX that has nothing to do with their contents.1. The deploy workflow runs where it cannot succeed
jekyll.ymltriggered on every push with no branch filter:GitHub Pages only accepts deployments from the configured source branch, so
deployfails on every feature branch. The history is unambiguous:mobile-demo-followupsmobile-docsmain× 13It also parked those runs in the shared
concurrency: group: "pages", where they can queue against a realmaindeploy.Now restricted to
main.2. The branch check builds the wrong thing
main.yml("Test Jekyll Build") ran:That is not how the site is assembled.
_config.ymltreats the repo root as the source and only pointslayouts_dir/includes_dirintodocs/. Building fromdocs/skips the root-levelassets/directory entirely:assets/css/style.cssemitted/gridwise/assets/css/style.css--source docs(this check)/gridwise/assets/css/style.cssSo 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: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 thebuildjob insidejekyll.yml— the job whose siblingdeployproduces 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
3.2while deploy pins3.3. Now both3.3, so the PR check runs against the Ruby the published site is built with.pushandpull_request, so a same-repo PR branch built twice per commit. Nowpull_requestpluspushonmain.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