diff --git a/packages/core/installMachine/installSteps/vercel/deploy.ts b/packages/core/installMachine/installSteps/vercel/deploy.ts index 1e0c573..60ae1db 100644 --- a/packages/core/installMachine/installSteps/vercel/deploy.ts +++ b/packages/core/installMachine/installSteps/vercel/deploy.ts @@ -8,12 +8,17 @@ export const deployVercelProject = async () => { }); logWithColoredPrefix('vercel', 'Creating production deployment...'); - const productionUrl = execSync('vercel --prod', { stdio: ['inherit', 'pipe', 'inherit'], encoding: 'utf8', }); + logWithColoredPrefix('vercel', 'Setting up environment variables...'); + execSync("grep PAYLOAD_SECRET apps/web/.env | cut -d '=' -f2 | vercel env add PAYLOAD_SECRET production", { + stdio: 'inherit', + encoding: 'utf8', + }); + if (productionUrl) { logWithColoredPrefix('vercel', `You can access your production deployment at: \x1b[36m${productionUrl}\x1b[0m`); } else {