ci: fail when dist/ does not match a clean rebuild - #1
Merged
Conversation
Apache serves the committed dist/ and the server never runs a build, so src/ and dist/ drifting apart is invisible in production. The existing "Verify output" step checks the seven pages exist, not that they match what src/ would produce, so a stale dist/ passes. A sibling site on the same template ran 20 months behind master before anyone noticed. This repo's dist/ currently reproduces exactly, so the check passes from the start. README gains a Deployment section: the manual pull, the rebuild-and-commit requirement, and the server's posture -- key-only SSH, fail2ban, 443 pinned to Cloudflare ranges, and specifically that port 80 must stay open while certbot validates over HTTP-01.
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.
Apache serves the committed
dist/and the server never runs a build, sosrc/and
dist/drifting apart is invisible in production.The existing Verify output step checks the seven pages exist — not that they
match what
src/would produce. A staledist/passes it. This adds a realgit diff --exit-code -- dist/check after the build.The sibling
cameronbrooks-netsite, built from the same template, ran 20 monthsbehind
masterbefore anyone noticed. This repo is in better shape —dist/currently reproduces exactly, so the check passes from the start.
Also adds a Deployment section to the README covering the manual pull, the
rebuild-and-commit requirement, and the server posture set on 2026-08-25:
key-only SSH, fail2ban, and 443 pinned to Cloudflare ranges. It calls out
specifically that port 80 must stay open — certbot uses the
apacheauthenticator (HTTP-01), so restricting it breaks renewal up to 90 days later
with no warning.
README.md and ci.yml were already outside the Prettier globs CI checks, and were
not Prettier-clean before this change either. Left alone rather than reformatted,
to keep the diff to the actual change.