Repository navigation
Build with GitHub Actions (Jekyll 4) and add manual preview deployments (Cloudflare Pages) - #109
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares the website for the redesign: a current Jekyll build via GitHub Actions and manual, login-protected preview deployments of any branch.
Changes
github-pagesgem (Jekyll 3.9, restricted plugins).Gemfile.lockis now committed.deploy.yml): pushes tomasterare built and deployed to GitHub Pages via Actions; pull requests are only built.preview.yml, manual): runs on any branch exceptmaster, deploys_siteto the Cloudflare Pages projectcontextmapper-preview(created by the workflow on the first run) →https://<branch>.contextmapper-preview.pages.dev, URL in the run summary.Verification
I built the site with the old (
github-pages228) and the new setup and compared all generated files:assets/css/style.cssof the github-pages gem is gone (nothing references it).name="twitter:…"), the generator version, and build timestamps.```ftlblocks as Fluent and marks them as errors (red), so the Freemarker examples are now marked astext(they were unhighlighted before).To do when merging
CLOUDFLARE_API_TOKEN(permission Account → Cloudflare Pages → Edit) andCLOUDFLARE_ACCOUNT_ID.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.