fix(deploy): use deploy user for file ownership instead of www-data

Changing ownership to www-data at end of deploy breaks permission
handling when pm2 runs as a different user (e.g., root or the deploy
user). Keep ownership as the deploy user throughout.
This commit is contained in:
openhands committed 2026-07-28 22:36:39 +02:00
1 parent e08e366266
commit 72079050f4
1 file changed
+1 -1
+1 -1
View File
@@ -377,7 +377,7 @@ jobs:
# Prisma client is gitignored — regenerate into live src/generated.
pnpm prisma:generate
sudo chown -R www-data:www-data "${LIVE}" 2>/dev/null || true
sudo chown -R "${DEPLOY_USER}:${DEPLOY_GROUP}" "${LIVE}" 2>/dev/null || true
echo "Starting PM2 (zero-downtime reload)..."
pm2 reload next --update-env || pm2 start next --update-env