ci: use prebuilt Zola 0.22.1 binary instead of building from source - #16
Merged
Conversation
The build workflow pinned Zola v0.19.2 and compiled it with `cargo install`, which required two extra checkouts (one sparse, just to hash Zola's Cargo.lock for a cache key) and a cargo cache to keep cold builds from dominating CI time. Zola publishes official release tarballs, so download and install one instead. This removes the extra checkouts, the cargo cache, and the Rust build entirely. The release artifacts are signed with Sigstore, so verify the download with `gh attestation verify` before installing it. Also: - Bump Zola 0.19.2 -> 0.22.1. The only breaking change in that range is 0.22.0 replacing the Syntect highlighter with Giallo and moving its config under [markdown.highlighting]. This site has no [markdown] section, so built-in highlighting is off and highlight.js from static/ is used instead. Not going to 0.23.x: it removes shortcodes, which tabi depends on. - Bump actions/checkout v5 -> v7. - Drop the blog-site/ subdirectory checkout and both working-directory settings, now that Zola's source is no longer checked out beside the site. - Scope `tree .` to `tree public` and drop the cat of one hardcoded post, which would break CI on a rename. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The build workflow pinned Zola v0.19.2 and compiled it with
cargo install. That needed two extra checkouts — one of them a sparse checkout existing only to hash Zola'sCargo.lockinto a cache key — plus a cargo cache to stop cold builds from dominating CI time.Zola publishes official release tarballs, so this downloads and installs one instead. The extra checkouts, the cargo cache, and the Rust build all go away; CI drops from minutes to seconds and the cache-invalidation logic disappears with it.
Supply chain
Zola signs its release artifacts with Sigstore, so the download is checked with
gh attestation verifybefore it is installed. Verified locally: the real tarball passes (exit 0), the same tarball with one byte appended fails (exit 1).ghis preinstalled onubuntu-latestandgithub.tokencovers the API call.Zola 0.19.2 -> 0.22.1
The only breaking change in that range is 0.22.0 replacing the Syntect highlighter with Giallo and moving highlighting config under
[markdown.highlighting]. This site has no[markdown]section at all, so built-in highlighting is off andhighlight.jsfromstatic/is used instead. (themes/tabi/config.tomldoes sethighlight_code = true, but that file is the theme's example config and is never merged into the site config.) Built locally with Zola 0.22.1: 8 pages, 2 sections, no warnings.Deliberately not going to 0.23.x, which is out. Upstream calls it "probably the most breaking version of Zola that will happen" — Tera v2 and shortcodes removed entirely. tabi is built on shortcodes, so that upgrade is blocked on the theme.
Also in this change
actions/checkoutv5 -> v7. The only behavior change is v7 blocking fork-PR checkout underpull_request_target/workflow_run, neither of which this workflow uses.blog-site/subdirectory checkout and bothworking-directory:settings, which only existed because Zola's source was checked out beside the site.tree .totree public(it was dumping the whole repo including the vendored theme) and dropped thecatof one hardcoded post path, which would fail CI on a rename. The404.htmlcat stayed.submodules: trueeven though.gitmodulesis empty and tabi is vendored — it is a no-op today and protects the build if tabi ever returns to being a submodule.Note
This workflow only builds; it never deploys, and there is no
netlify.toml/vercel.jsonin the repo. If whatever publishes blog.flix.dev pins its own Zola version, that needs bumping to 0.22.1 separately.🤖 Generated with Claude Code