fix: use real DATABASE_URL from .env for migrations in deploy workflow
CI / check (push) Successful in 24s
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 1m12s
CI / deploy (push) Failing after 10s

The deploy job was overwriting DATABASE_URL with a placeholder for
prisma:generate, but this persisted when db:migrate ran later, causing
ER_ACCESS_DENIED_ERROR. Since the stage directory already symlinks to
the live .env, the real DATABASE_URL is available without override.
This commit is contained in:
openhands committed 2026-07-30 20:16:24 +02:00
1 parent 525f58cd24
commit 822dfd6a1c
1 file changed
+4 -4
+4 -4
View File
@@ -335,10 +335,10 @@ jobs:
export DATABASE_POOL_SIZE="${DEPLOY_DATABASE_POOL_SIZE:-5}"
echo "STAGE DATABASE_POOL_SIZE=${DATABASE_POOL_SIZE}"
pnpm install --frozen-lockfile
export DATABASE_URL="${DEPLOY_DATABASE_URL:-mysql://placeholder:please@localhost/placeholder}"
# prisma generate does not need a live DB connection.
pnpm prisma:generate
pnpm install --frozen-lockfile
# Stage symlinks to live .env, so DATABASE_URL is already the real value.
# prisma generate only needs the URL for client generation — no live DB connection.
pnpm prisma:generate
export BCRYPT_ROUNDS=4
pnpm typecheck
# Validate production env (AUTH_SECRET, DATABASE_URL, …) during build.