Skip to content

Build with GitHub Actions (Jekyll 4) and add manual preview deployments (Cloudflare Pages) - #109

Merged
stefan-ka merged 3 commits into
masterfrom
chore/actions-build-and-preview
Oct 23, 2026
Merged

stefan-ka merged 3 commits into
masterfrom
chore/actions-build-and-preview

Conversation

@stefan-ka

Copy link
Copy Markdown
Member

Prepares the website for the redesign: a current Jekyll build via GitHub Actions and manual, login-protected preview deployments of any branch.

Changes

  • Jekyll 4.4 instead of the github-pages gem (Jekyll 3.9, restricted plugins). Gemfile.lock is now committed.
  • Production (deploy.yml): pushes to master are built and deployed to GitHub Pages via Actions; pull requests are only built.
  • Previews (preview.yml, manual): runs on any branch except master, deploys _site to the Cloudflare Pages project contextmapper-preview (created by the workflow on the first run) → https://<branch>.contextmapper-preview.pages.dev, URL in the run summary.
  • README: local setup, deployment and previews.
  • Removed the unused Dockerfile/nginx config (Alpine 3.7) and the Gitpod config.

Verification

I built the site with the old (github-pages 228) and the new setup and compared all generated files:

  • Same set of pages. Only the unused default theme stylesheet assets/css/style.css of the github-pages gem is gone (nothing references it).
  • HTML differences: SEO tag 2.9.1 meta attributes (name="twitter:…"), the generator version, and build timestamps.
  • Rouge 4 highlights ```ftl blocks as Fluent and marks them as errors (red), so the Freemarker examples are now marked as text (they were unhighlighted before).

To do when merging

  1. Settings → Pages → Source: GitHub Actions (instead of "Deploy from a branch"). The custom domain stays.
  2. For previews: secrets CLOUDFLARE_API_TOKEN (permission Account → Cloudflare Pages → Edit) and CLOUDFLARE_ACCOUNT_ID.
  3. After the first preview run: in Cloudflare, Workers & Pages → contextmapper-preview → Settings → General → Access policy (preview deployments) → Enable, and add the reviewers' emails to the policy.

Note: GitHub only offers "Run workflow" for workflows that exist on the default branch, so the preview workflow can be tested after the merge only.

The github-pages gem pins Jekyll 3.9 and a restricted set of plugins. With
the GitHub Actions build we can use current Jekyll. The Gemfile.lock is now
committed so that local and CI builds use the same versions.

The Freemarker code blocks are marked as text, because Rouge 4 maps 'ftl'
to the Fluent lexer and marks most of the template syntax as errors.
Pushes to master are built and deployed to GitHub Pages by a workflow;
pull requests are built only. Any other branch can be deployed manually to
Cloudflare Pages (protected by Cloudflare Access) to review it in the
browser before merging.
The Dockerfile (Alpine 3.7) was not used anymore and does not work with
the current Gemfile; Gitpod Classic has been discontinued.
@stefan-ka
stefan-ka marked this pull request as ready for review October 23, 2026 08:07
@stefan-ka
stefan-ka merged commit d730a0f into master Oct 23, 2026
2 checks passed
@stefan-ka
stefan-ka deleted the chore/actions-build-and-preview branch October 23, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant