Repository navigation
fix(deploy): run PurgeCSS in the Pages deploy workflow - #53
Merged
Merged
Conversation
ci.yml purges _site/ CSS before html-proofer, but jekyll.yml never did, so the live site shipped the full Webflow CSS (live inog-website.webflow.css was 129,834 bytes, identical to source) while CI validated the purged output. Add the same setup-node, npm ci and purge-css steps to the deploy build. Also correct the repo memory notes that claimed production CSS was already purged.
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 deploy workflow never ran PurgeCSS, so the live site ships the full Webflow CSS while CI validates the purged version.
Problem
ci.ymlrunsnpm run purge-csson_site/before html-proofer.jekyll.yml, which builds what GitHub Pages serves, only runsjekyll build. The livehttps://www.inoeg.de/assets/css/inog-website.webflow.cssis 129,834 bytes, byte-for-byte the source size. Purged, it is 36,516 bytes (-72%). The intent ind3d9a88was for production to ship the purged CSS, andmemory/finding-unused-assets.mdclaimed it already did.Change
jekyll.yml: add the samesetup-node(Node 24, npm cache),npm ciandnpm run purge-csssteps asci.yml, after the Jekyll build and before the artifact upload.memory/: correct both notes to match.Verification
The risk is a class used on some page being purged, which html-proofer cannot detect. I ran a headless-Chrome comparison of
main's build, unpurged (what is live today) against purged, on all 8 non-redirect pages, in 3 views each (1440 px desktop, 390 px mobile, 390 px with the mobile menu opened):::before/::after: bounding box and 21 computed properties (display, colors, fonts, margins, padding, sizes, transforms, ...). 0 differences in 24 of 24 views.document.body.scrollHeight: identical in 24 of 24 views./projekte/with the menu open, also flaps when the unpurged site is compared against itself (1 of 3 runs), and was equal in 3 of 3 reruns against purged. It is screenshot timing, not CSS.padding-top: 3pxrule on every view of the pages that load it.Not done
:hover/:focusstates were not exercised. PurgeCSS keeps pseudo-class rules whose base selector survives, and the comparison shows every base selector's styles intact.Risk
None. No auth, authorization, tenancy, billing or cryptography code is touched. This changes the production CSS of the public site on merge.
Skills used