From 685033dcbda1bb5cd6d095ac4c82ab1f06609c48 Mon Sep 17 00:00:00 2001 From: Simo Date: Sun, 12 Jul 2026 14:22:07 +0200 Subject: [PATCH] Update .gitea/workflows/deploy.yaml --- .gitea/workflows/deploy.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index fde61ec1..3a27bf42 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -18,9 +18,6 @@ jobs: # 2. Navigate to your website directory cd /var/www/atom-nexst/ - # Prevent Git permission errors from the previous www-data ownership change - git config --global --add safe.directory /var/www/atom-nexst - # Point Git directly to the local Gitea folder path git remote set-url origin /docker/gitea/gitea/git/repositories/remco/epicnext-cms.git/ @@ -31,14 +28,15 @@ jobs: # REMOVE OLD CACHE AND BUILDS rm -rf .next .output dist - # 4. Configure trusted dependencies and install packages smoothly + # 4. Configure trusted dependencies globally for this session and install export PNPM_CONFIG_ONLY_BUILT_DEPENDENCIES="@parcel/watcher,@swc/core,sharp" - pnpm install + pnpm install --frozen-lockfile - # 5. Sync Prisma with the actual DB structure and generate types - echo "Syncing schema with database..." - pnpm prisma db pull - pnpm prisma generate + # 5. Apply versioned CMS migrations and generate the Prisma client. + # Never run `prisma db pull` during deploy: it rewrites schema.prisma + # from the live emulator database and can discard CMS schema metadata. + pnpm db:migrate + pnpm prisma:generate # 6. Next.js Build pnpm build @@ -58,4 +56,4 @@ jobs: exit 1 fi - echo "--- Deployment successfully completed ---" \ No newline at end of file + echo "--- Deployment successfully completed ---"