Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Oct 11, 2024
1 parent 286a1b1 commit ee35d11
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions clis/vercel-scripts/src/utils/deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,16 @@ export class VercelDeployer {
});
}

private async deploy(project: { id: string; name: string }): Promise<Vercel.GetDeploymentResponse> {
let command = `pnpx vercel deploy --yes --prebuilt --token=${this.token} --archive=tgz`;
private async deploy(
project: { id: string; name: string },
opts?: { prebuilt?: boolean },
): Promise<Vercel.GetDeploymentResponse> {
let command = `pnpx vercel deploy --yes --token=${this.token} --archive=tgz`;

if (opts?.prebuilt) {
command += " --prebuilt";
}

if (this.environment === "production") {
command += " --prod --skip-domain";
}
Expand Down Expand Up @@ -121,13 +129,13 @@ export class VercelDeployer {

this.pull(prj);

this.build(prj);

if (skipDeploy) {
// build-only
this.build(prj);
return;
}

const deployment = await this.deploy(prj);
const deployment = await this.deploy(prj, { prebuilt: false });

await this.promote(deployment);

Expand Down

0 comments on commit ee35d11

Please sign in to comment.