Skip to content

Simplify generate-site workflow with explicit Jekyll dependencies and standard GitHub Actions - #30

Merged
vsoch merged 9 commits into
mainfrom
copilot/update-jekyll-build-command
May 26, 2026
Merged

vsoch merged 9 commits into
mainfrom
copilot/update-jekyll-build-command

Conversation

Copilot AI commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

This PR replaces the previous custom Jekyll container patching flow with a simpler, standard GitHub Actions-based site build and deploy workflow.

Changes Made

  • Jekyll dependencies: Replace the github-pages meta-gem with explicit pinned site dependencies:
    • jekyll ~> 4.4
    • jekyll-scholar ~> 7.3
  • Lockfile: Commit Gemfile.lock so Bundler resolves a reproducible gem set in CI.
  • Workflow setup: Replace the custom Jekyll Docker build logic with:
    • actions/checkout@v4
    • ruby/setup-ruby@v1 with Ruby 3.2
    • Bundler caching
    • bundle exec jekyll build --future
  • Deployment: Replace the manual gh-pages branch shell script with peaceiris/actions-gh-pages@v4.
  • Cleanup: Remove the inline bibtex-ruby compatibility patching and the manual Docker-based Jekyll build recipe.

The existing latex2md content-generation step is preserved, but the Jekyll build and deploy path now uses a supported Ruby/Jekyll toolchain instead of runtime patching inside the workflow.

Testing

  • ✅ Local Bundler install completes with the new dependency set
  • ✅ bundle exec jekyll build --future succeeds on Ruby 3.2
  • ✅ Final automated validation passed
    • Code Review: no comments
    • CodeQL: no alerts
Original prompt

The GitHub Actions job in rse-ops/landscape is failing while building the Jekyll site.

Context:

  • Failing job URL: https://github.com/rse-ops/landscape/actions/runs/26302395018/job/77430587007
  • Workflow file: .github/workflows/generate-site.yaml
  • The failing step is the Jekyll build.
  • Current workflow invokes Jekyll directly inside jekyll/builder:4.0:
    • jekyll build --future
  • Job logs show the build failing under Jekyll 3.10.0 with:
    • jekyll 3.10.0 | Error: tried to create Proc object without a block

Relevant files:

  • .github/workflows/generate-site.yaml
  • Gemfile
  • _config.yml

Requested change:

  • Create a pull request that updates the workflow to use Bundler-managed project dependencies for the Jekyll build instead of invoking the preinstalled Jekyll directly.
  • The likely minimal fix is to change the workflow build command to run bundle install and bundle exec jekyll build --future inside the container.
  • Keep the change focused on getting the workflow unblocked.

Implementation guidance:

  1. Update .github/workflows/generate-site.yaml in the "Build Jekyll site" step.
  2. Replace the direct jekyll build --future invocation with a Bundler-based invocation.
  3. Preserve the existing Docker-based build approach unless a small workflow adjustment is needed to make bundler execution reliable.
  4. If needed, make minimal related changes that improve reliability, but avoid broad refactors.
  5. Include a concise PR description explaining the suspected version mismatch and why bundle exec should fix it.

Acceptance criteria:

  • The workflow no longer directly calls jekyll build without Bundler.
  • The PR is minimal and focused on the failing build.
  • The PR description explains the root cause hypothesis and the intended fix.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The failure is most likely caused by a Jekyll version mismatch in the workflow.

Root cause

The workflow builds the site with the Docker image jekyll/builder:4.0:

But the job log shows the build actually failing inside Jekyll 3.10.0 with:

  • jekyll 3.10.0 | Error: tried to create Proc object without a block

The repository also pins its site dependencies through github-pages and jekyll-scholar:

That combination is a common source of breakage when the container’s preinstalled gems don’t match the project’s Gemfile/Bundler lock expectations.

Fix

Build the site with Bundler inside the container instead of calling jekyll build directly.

Recommended workflow change

Replace:

- name: Build Jekyll site
  run: |
    set -xo pipefail
    rm -rf _site/*
    docker run --rm \
      -v "$PWD:/srv/jekyll" -v "$PWD/_site:/srv/jekyll/_site" \
         jekyll/builder:4.0 /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future && chmod -R 777 /srv/jekyll"

with:

- name: Build Jekyll site
  run: |
    set -euxo pipefail
    rm -rf _site/*
    docker run --rm \
      -v "$PWD:/srv/jekyll" \
      -v "$PWD/_site:/srv/jekyll/_site" \
      jekyll/builder:4.0 \
      /bin/bash -c "
        chmod -R 777 /srv/jekyll &&
        bundle install &&
        bundle exec jekyll build --future &&
        chmod -R 777 /srv/jekyll
      "

Why this solves it

bundle exec jekyll build forces the build to use the gem versions defined by the repo rather than whatever Jekyll/gems happen to be preinstalled in the image.

If the error persists

The next likely issue is that github-pages and jekyll-scholar may be resolving to incompatible versions together. In that case, the cleanest repo-side fix is to pin versions explicitly in Gemfile, for example:

gem "github-pages", group: :jekyll_plugins
gem "jekyll-scholar", "~> 7.0", group: :jekyll_plugins

and commit the resulting Gemfile.lock.

Most targeted change

If you want the smallest possible fix, update only .github/workflows/generate-site.yaml so the build step uses:

bundle install && bundle exec jekyll build --future

instead of:

jekyll build --future

User: Can you open a pr to start working on this

Assistant: I’ve prepared the PR creation request and we’re waiting for your confirmation in the GitHub prompt before I can continue.

This pull request was created from Copilot chat.

Copilot AI and others added 2 commits May 22, 2026 17:50
Copilot AI changed the title [WIP] Update GitHub Actions to use Bundler for Jekyll build Use Bundler-managed Jekyll build in generate-site workflow May 22, 2026
Copilot finished work on behalf of vsoch May 22, 2026 17:57
Copilot AI requested a review from vsoch May 22, 2026 17:57
@vsoch

vsoch commented May 22, 2026

Copy link
Copy Markdown
Collaborator

The checks are failing @copilot please fix.

Copilot AI and others added 3 commits May 22, 2026 21:44

Copilot AI commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

The checks are failing @copilot please fix.

Fixed in 905eb82. The failing check was hitting a Bundler permission error under /usr/gem/cache, so I updated the Jekyll build step to keep running as the workflow user but install gems into a writable temp Bundler path (BUNDLE_PATH=/tmp/bundle, HOME=/tmp).

Copilot finished work on behalf of vsoch May 22, 2026 21:52
@vsoch

vsoch commented May 23, 2026

Copy link
Copy Markdown
Collaborator

@copilot please keep debugging and making changes until the tests pass.

Copilot AI commented May 23, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot please keep debugging and making changes until the tests pass.

Fixed in 99d94a5. I traced the current failure past Bundler into a Ruby 3 incompatibility in bibtex-ruby 4.4.7, and updated the workflow to patch those incompatible methods inside the build container immediately after bundle install before running bundle exec jekyll build --future.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • rubydoc.info
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • www.google.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Use Bundler-managed Jekyll build in generate-site workflow Use Bundler-managed Jekyll build and patch bibtex-ruby in generate-site workflow May 23, 2026
Copilot finished work on behalf of vsoch May 23, 2026 00:57
@vsoch

vsoch commented May 26, 2026

Copy link
Copy Markdown
Collaborator

@copilot it is still failing. You are not very good at this it seems.

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

@copilot it is still failing. You are not very good at this it seems.

Fixed in 2ddc73d. The remaining failure was that _site did not exist on a fresh checkout before the Docker bind mount, so the non-root Jekyll process could not create _site/paper-details; the workflow now creates _site before starting the container.

Copilot finished work on behalf of vsoch May 26, 2026 15:16

@vsoch vsoch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot this is way too complex a recipe for just doing a jekyll build and deploy. You need to rethink and start from scratch. OK to use other GitHub actions, etc.

Copilot AI changed the title Use Bundler-managed Jekyll build and patch bibtex-ruby in generate-site workflow Simplify generate-site workflow with explicit Jekyll dependencies and standard GitHub Actions May 26, 2026
Copilot finished work on behalf of vsoch May 26, 2026 20:49
Copilot AI requested a review from vsoch May 26, 2026 20:49
@vsoch
vsoch marked this pull request as ready for review May 26, 2026 20:58
@vsoch
vsoch merged commit 439009e into main May 26, 2026
1 check passed
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.

2 participants