Repository navigation
Build the site from a locked flake and check pull requests - #95
Merged
Merged
Conversation
The pages workflow ran `nix run 'nixpkgs#mdbook'`, so each deploy used the mdBook of whatever nixpkgs the flake registry resolved that day. flake.nix is a caisson flake laid out as topside is. Its `site` package runs mdBook from the nixpkgs that flake.lock pins, copies assets/brand into site/assets/brand, and outputs site/. The pages workflow builds that package and uploads `result/`. `nix flake check` builds the package and checks the formatting of the Nix files. The new check workflow runs it on every pull request and every push to main. Every action in both workflows is pinned by commit SHA. Co-Authored-By: Claude Opus 5.5 <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 pages workflow ran
nix run 'nixpkgs#mdbook' -- build. Each deploy therefore used the mdBook of whatever nixpkgs the flake registry resolved on that run. Pull requests ran no checks.This adds a caisson flake, laid out as topside is, with a committed
flake.lock.packages.<system>.siteruns mdBook from the nixpkgs thatflake.lockpins (nixos-unstable atf4a03c008967841f2a0b3cb7c436fc6fc31671f6, mdBook 0.5.4).assets/brandintosite/assets/brand, as the workflow did before.site/directory that Pages serves.checks.<system>.sitebuilds the package, andchecks.<system>.treefmtchecks the formatting of the Nix files.tests/dependencies/, as in topside.pages.ymlbuilds.#siteand uploadsresult/.check.ymlrunsnix flake checkon every pull request and every push tomain.pages.ymlused.mdbook servefrom the locked nixpkgs, and the checks.book.tomluses no preprocessors and the repository has no build-tool lockfile, so mdBook is the only build dependency.Verification
nix build '.#site'on x86_64-linux produced a tree identical to a plainnix run 'nixpkgs#mdbook' -- buildofmainfollowed by thecp(diff -rreports no differences). The registry's mdBook is 0.5.4 today as well.nix flake checkpasses.🤖 Generated with Claude Code