fix(ci): deploy built unstyled pages; files arrived world-writable #2

Merged
gozen merged 1 commit from fix/deploy-postcss-and-perms into main 2026-11-15 19:47:03 +01:00
Owner

Problem

The first staged deploy shipped pages without styles. The server's staging copy came from a hand-kept file list that was missing postcss.config.mjs (added in the Astro 7 upgrade), so Tailwind never ran on the server. The CI check passed because it builds from the full checkout.

Separately, rsync -a copied the runner's world-writable file modes onto the server (777/666).

Fix

  • The staging copy is the whole checkout minus data, secrets, docs and tooling, so the server builds exactly what CI built.
  • Every root *.config.mjs is copied to the live directory.
  • The deploy fails before the swap, and the CI check fails too, if any CSS still contains @tailwind directives.
  • rsync --chmod=Dgo-w,Fgo-w removes group and world write: folders arrive 755, files 644.

Test plan

  • Simulated a world-writable checkout, ran the staging rsync, npm ci and the build: modes 755/644, postcss.config.mjs present, 84 KB of processed CSS, check passes
  • The check catches the broken build (raw @tailwind in a 12 KB CSS file)
  • After merge: the deploy job passes, the site is styled, and src/, public/ and scripts/ on the server are 755
## Problem The first staged deploy shipped pages without styles. The server's staging copy came from a hand-kept file list that was missing `postcss.config.mjs` (added in the Astro 7 upgrade), so Tailwind never ran on the server. The CI check passed because it builds from the full checkout. Separately, `rsync -a` copied the runner's world-writable file modes onto the server (777/666). ## Fix - The staging copy is the whole checkout minus data, secrets, docs and tooling, so the server builds exactly what CI built. - Every root `*.config.mjs` is copied to the live directory. - The deploy fails before the swap, and the CI check fails too, if any CSS still contains `@tailwind` directives. - `rsync --chmod=Dgo-w,Fgo-w` removes group and world write: folders arrive 755, files 644. ## Test plan - [x] Simulated a world-writable checkout, ran the staging rsync, `npm ci` and the build: modes 755/644, `postcss.config.mjs` present, 84 KB of processed CSS, check passes - [x] The check catches the broken build (raw `@tailwind` in a 12 KB CSS file) - [ ] After merge: the deploy job passes, the site is styled, and `src/`, `public/` and `scripts/` on the server are 755
fix(ci): deploy built unstyled pages; files arrived world-writable
All checks were successful
CI/CD / Build (type-check gate) (pull_request) Successful in 22s
CI/CD / Deploy to production (staged build on server) (pull_request) Has been skipped
c7f473b149
The staging sync used a hand-kept file list that missed postcss.config.mjs
(added with the Astro 7 upgrade), so the server built without Tailwind and
shipped raw @tailwind directives. The gate passed because it builds from
the full checkout.

- Sync the whole checkout (minus data, secrets, docs, tooling) into the
  staging dir, so the server builds exactly what the gate built.
- Promote every root *.config.mjs.
- Fail before the swap (and in the gate) if any CSS still contains
  @tailwind directives.
- rsync --chmod=Dgo-w,Fgo-w: the runner checkout is world-writable and
  rsync -a copied its 777/666 modes onto the server.
gozen merged commit acc2afef32 into main 2026-11-15 19:47:03 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GOZEN-HOST/status-page!2
No description provided.