Skip to content

Migrate GitHub Pages publishing to GitHub Actions workflow #198

@mmcky

Description

@mmcky

Background

The site is currently published via the legacy GitHub Pages build (Pages → Source: main branch, / root). This means production builds use the GitHub Pages gem sandbox, which is pinned to Jekyll 3.10 and libsass (via jekyll-sass-converter 1.x).

In #194 the local Gemfile was bumped to jekyll ~> 4.4, but that version is only used locally and on the Netlify deploy preview — production still runs on the older sandboxed Jekyll. This was discovered when the new SCSS used @use directives (Dart Sass), which work locally but would fail on legacy GH Pages. As a workaround, 65163f9 reverted those back to @import.

Goal

Switch to a GitHub Actions deploy workflow so production uses the same Jekyll version as the Gemfile, and so we can use modern features (Dart Sass @use/@forward, newer Liquid filters, etc.) without surprises.

Proposed approach

  1. Pages settings → change Source from "Deploy from a branch" to "GitHub Actions" (https://github.com/QuantEcon/website/settings/pages)
  2. Add .github/workflows/deploy.yml using the standard pattern:
    • actions/checkout
    • ruby/setup-ruby with bundler-cache: true
    • actions/configure-pages
    • bundle exec jekyll build (with JEKYLL_ENV=production)
    • actions/upload-pages-artifact
    • actions/deploy-pages
  3. Trigger on push to main (and workflow_dispatch)
  4. Keep the existing PR build.yml for preview validation, or merge them

After migration we can

  • Restore @use in assets/main.scss and remove the Dart Sass @import deprecation warnings
  • Use any Jekyll 4.x-only filters (group_by_exp, etc.) safely
  • Drop reliance on the github-pages gem set entirely

Verification

  • Confirm CNAME (quantecon.org) is preserved
  • Confirm redirects in pages/ still resolve
  • Verify all collections (_posts, _lectures, _team-members, _projects) build identically
  • Check sitemap.xml and feed.xml output

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions