Skip to content

Commit

Permalink
Merge pull request #16 from tonik/fix/vercel-deploy
Browse files Browse the repository at this point in the history
fix: create prod deployment and then preview deployment
  • Loading branch information
maneike authored Oct 29, 2024
2 parents f7eb43c + 5ecceda commit cce3451
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/core/utils/vercel/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export const deployVercelProject = async () => {

await fs.writeFile('vercel.json', JSON.stringify(vercelConfig, null, 2));

console.log('๐Ÿ–‡๏ธ Creating preview deployment...');
const previewUrl = getDeploymentUrl(false);

console.log('๐Ÿ–‡๏ธ Creating production deployment...');
const productionUrl = getDeploymentUrl(true);

console.log(`๐Ÿ–‡๏ธ You can access your preview deployment at: \x1b[36m${previewUrl}\x1b[0m$`);
console.log('๐Ÿ–‡๏ธ Creating preview deployment...');
const previewUrl = getDeploymentUrl(false);

console.log(`๐Ÿ–‡๏ธ You can access your preview deployment at: \x1b[36m${previewUrl}\x1b[0m`);

console.log(`๐Ÿ–‡๏ธ You can access your production deployment at: \x1b[36m${productionUrl}\x1b[0m$`);
console.log(`๐Ÿ–‡๏ธ You can access your production deployment at: \x1b[36m${productionUrl}\x1b[0m`);
};
5 changes: 4 additions & 1 deletion packages/core/utils/vercel/utils/getDeploymentUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ export const getDeploymentUrl = (production: boolean = false): string => {
const command = production ? 'vercel --prod' : 'vercel';

try {
const output = execSync(command, { encoding: 'utf8' });
const output = execSync(command, {
stdio: ['inherit', 'pipe', 'inherit'],
encoding: 'utf8',
});

if (output) {
return output;
Expand Down

0 comments on commit cce3451

Please sign in to comment.