Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Deploy Jekyll site to Pages

on:
# Only main. GitHub Pages accepts deployments from the configured source
# branch only, so running this anywhere else guarantees a failed `deploy`
# job and parks the run in the shared "pages" concurrency group below.
# Branch and PR builds are covered by the Test Jekyll Build workflow.
push:
branches: [main]
workflow_dispatch:

permissions:
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Test Jekyll Build

on:
# `pull_request` covers branches with an open PR; `push` on main covers
# everything that lands. Previously this ran on every push AND every
# pull_request, so a same-repo PR branch built twice per commit.
push:
branches: [main]
pull_request:

jobs:
Expand All @@ -14,10 +18,22 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
# Matches the deploy workflow, so this check runs against the same
# Ruby the published site is built with.
ruby-version: '3.3'
bundler-cache: true

# Build from the repo root, exactly as the deploy workflow does.
# This previously passed `--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 with
# `--source docs` skipped the root-level assets/ directory entirely, 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 this check incapable of catching a broken stylesheet: a
# deliberate syntax error in style.scss still exited 0 here, and 1 when
# built from the root.
- name: Build site
run: bundle exec jekyll build --source docs --baseurl "/gridwise"
run: bundle exec jekyll build --baseurl "/gridwise"
env:
JEKYLL_ENV: production
Loading