From ec7257f4ea93e65050aff379a3b6d2aa9b9d9dda Mon Sep 17 00:00:00 2001 From: Simo Date: Sun, 12 Jul 2026 14:09:57 +0200 Subject: [PATCH] Update .gitea/workflows/deploy.yaml --- .gitea/workflows/deploy.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index e76d703b..26ba4168 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -28,21 +28,21 @@ jobs: # REMOVE OLD CACHE AND BUILDS rm -rf .next .output dist - # 4. Configure pnpm to automatically approve build scripts - pnpm config set trusted-dependencies @parcel/watcher,@swc/core,sharp + # 4. Install dependencies and allow build scripts for sharp, swc, and parcel + pnpm install --frozen-lockfile --only-built-dependencies=@parcel/watcher,@swc/core,sharp - # Install dependencies - pnpm install --frozen-lockfile - - # Database updates, client generation and build (CORRECT ORDER) + # 5. Sync Prisma with the actual DB structure and generate types + echo "Syncing schema with database..." + pnpm prisma db pull pnpm prisma generate - pnpm prisma migrate deploy + + # 6. Next.js Build pnpm build - # 5. Fix ownership: Build first, THEN set permissions for the web server + # 7. Fix ownership: Build first, THEN set permissions for the web server sudo chown -R www-data:www-data /var/www/atom-nexst/ - # 6. Hard restart of the Systemd service to clear memory cache + # 8. Hard restart of the Systemd service to clear memory cache echo "Hard resetting systemd service..." sudo systemctl stop atom-nexst.service sudo systemctl start atom-nexst.service