Skip to content

Commit

Permalink
feat: add PAYLOAD_SECRET to vercel env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
maneike committed Nov 6, 2024
1 parent e90e3d2 commit ea08dd4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/installMachine/installSteps/vercel/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ea08dd4

Please sign in to comment.