@@ -185,12 +185,18 @@ jobs:
185185 { echo "communications dist/server/index.js missing"; exit 1; }
186186 echo "All plugin dist files OK"
187187
188- - name : Build Strapi
188+ - name : Build Strapi (admin + server)
189189 working-directory : backend
190190 env :
191191 NODE_ENV : production
192192 run : pnpm build
193193
194+ - name : Verify Strapi admin dist
195+ working-directory : backend
196+ run : |
197+ test -d dist/build || { echo "Strapi admin dist/build missing!"; exit 1; }
198+ echo "Strapi admin dist OK"
199+
194200 - name : Bundle (no node_modules / uploads / env / tmp)
195201 shell : bash
196202 run : |
@@ -412,7 +418,7 @@ jobs:
412418
413419 log "Installing deps in new release..."
414420 cd "$NEW_DIR"
415- export NODE_OPTIONS="--max-old-space-size=1024 "
421+ export NODE_OPTIONS="--max-old-space-size=1536 "
416422 pnpm install --prod --frozen-lockfile=false --prefer-offline --network-concurrency 1
417423
418424 log "Building better-sqlite3 native addon..."
@@ -425,6 +431,21 @@ jobs:
425431 { log "ERROR: better_sqlite3.node not found after build!"; exit 1; }
426432 log "better_sqlite3.node OK"
427433
434+ # ── Strapi admin UI build (CSS + admin customizations) ──────────
435+ # A CI már buildelte, de --prod install után a Strapi saját
436+ # post-install hook-ja felülírhatja. Ezért újrabuildelünk
437+ # devDependencies nélkül, csak az admin dist-et frissítve.
438+ log "Rebuilding Strapi admin on VPS to apply CSS + customizations..."
439+ pnpm install --frozen-lockfile=false --prefer-offline --network-concurrency 1
440+ NODE_ENV=production pnpm build
441+ log "Strapi admin build done."
442+
443+ # devDependencies törlése a memória spóroláshoz
444+ log "Pruning devDependencies after admin build..."
445+ pnpm install --prod --frozen-lockfile=false --prefer-offline --network-concurrency 1
446+ log "Prune done."
447+ # ────────────────────────────────────────────────────────────────
448+
428449 log "Stopping backend..."
429450 cd ~
430451 pm2 stop backend || true
0 commit comments