diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 1e2d38c..cd9bd27 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -51,6 +51,19 @@ jobs: env: JEKYLL_ENV: production + - name: Setup Node + uses: actions/setup-node@v7 + with: + node-version: "24" + cache: "npm" + + - name: Install npm dependencies + run: npm ci + + # Same step as ci.yml: ship the purged CSS that CI checked, not the full Webflow export. + - name: Purge unused CSS + run: npm run purge-css + - name: Upload artifact # Automatically uploads an artifact from the './_site' directory by default uses: actions/upload-pages-artifact@v5 diff --git a/memory/ci-and-verification.md b/memory/ci-and-verification.md index dbff205..3c11764 100644 --- a/memory/ci-and-verification.md +++ b/memory/ci-and-verification.md @@ -2,7 +2,7 @@ ## How the site is built and deployed -- Deployed via **GitHub Actions** (`.github/workflows/jekyll.yml`) running `bundle exec jekyll build`, **not** the `github-pages` gem (it is commented out in +- Deployed via **GitHub Actions** (`.github/workflows/jekyll.yml`) running `bundle exec jekyll build` then `npm run purge-css`, **not** the `github-pages` gem (it is commented out in the `Gemfile`). Consequence: the site is **not** restricted to the GitHub Pages plugin allowlist — any Jekyll plugin listed in the `Gemfile` + `_config.yml` `plugins:` works. (The old `whitelist:` block was removed as dead config.) - PRs are gated by `.github/workflows/ci.yml`: build → PurgeCSS → html-proofer → pa11y (non-blocking) → prettier. `_site/` is built during CI, so anything that diff --git a/memory/finding-unused-assets.md b/memory/finding-unused-assets.md index 15f9c20..4171555 100644 --- a/memory/finding-unused-assets.md +++ b/memory/finding-unused-assets.md @@ -20,6 +20,7 @@ Two false-positive traps that made me nearly flag _used_ files as orphans: `` — all 13 documents/ PDFs are in fact linked in `veroeffentlichungen.md`. Also note: dead Webflow CSS (unused `w-icon-*`, `w-lightbox-*` rules and their embedded `data:` fonts/images) is stripped from production by PurgeCSS, so it -never reaches users even when left in the source `assets/css/`. +never reaches users even when left in the source `assets/css/`. This holds only because the deploy workflow (`jekyll.yml`) runs `npm run purge-css`; until +2026-11 only `ci.yml` did, and the live site shipped the full 127 KB Webflow CSS. Check the live file size, not this note. Decision on file (2026-07): the maintainer chose NOT to delete orphaned image files despite ~4 MB being unused. Don't propose asset deletion again unless asked.