From 8e5d7bf4376a13b9fd8f62bf8e4d28fdf5d9ecfd Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 20 Feb 2026 15:51:51 +1100 Subject: [PATCH] Add netlify.toml for PR deploy previews and CI build workflow - netlify.toml: configures Ruby 3.2, bundle install, and jekyll build so Netlify can generate deploy previews for PRs - .github/workflows/build.yml: lightweight Jekyll build check on PRs using ruby/setup-ruby with bundler caching --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ netlify.toml | 17 +++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 netlify.toml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..2a2a122d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build Preview + +on: + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + + - name: Build Jekyll site + run: bundle exec jekyll build + env: + JEKYLL_ENV: production diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..3ef36ed5 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,17 @@ +# Netlify configuration for PR deploy previews +# Production hosting is on GitHub Pages — Netlify is used for previews only + +[build] + command = "bundle install && bundle exec jekyll build" + publish = "_site" + +[build.environment] + RUBY_VERSION = "3.2.2" + BUNDLE_PATH = "vendor/bundle" + +# Deploy preview context (PRs) +[context.deploy-preview] + command = "bundle install && bundle exec jekyll build" + +[context.deploy-preview.environment] + JEKYLL_ENV = "development"