Skip to content

Commit

Permalink
πŸš€ Updated Vercel deployment script for Pierre (#update-vercel-ci-v1)
Browse files Browse the repository at this point in the history
Summary: Updated Vercel deployment script for Pierre.

Highlights:

β€’ Added `vercel pull` command with environment variable.
β€’ Added `vercel build` command with production flag.
β€’ Modified `vercel deploy` command to include `--prebuilt` flag.

Read more: https://pierre.co/hey/hey/update-vercel-ci-v1
  • Loading branch information
Yoginth authored and Pierre committed Sep 24, 2024
1 parent 84abbfb commit 0fdf455
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .pierre/ci/utils/vercel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,24 @@ export const Job =
const VERCEL_SCOPE = "heyxyz";

await run("rm -rf .pnpm-store");
await run('echo "$PWD"');

await run(`${vercel} pull --yes --token $VERCEL_ACCESS_TOKEN`, {
label: `Pulling ${PROJECT_NAME} Deployment`,
env: { VERCEL_ORG_ID, VERCEL_PROJECT_ID }
});

await run(
`${vercel} build ${isProd ? "--prod" : ""} --token $VERCEL_ACCESS_TOKEN`,
{
label: `Building ${PROJECT_NAME} Deployment`,
env: { VERCEL_ORG_ID, VERCEL_PROJECT_ID }
}
);

const { stdout } = await run(
`${vercel} deploy --scope ${VERCEL_SCOPE} ${isProd ? "" : "--no-wait"} --yes ${
`${vercel} deploy --prebuilt --scope ${VERCEL_SCOPE} ${isProd ? "" : "--no-wait"} --yes ${
isProd ? "--prod" : ""
} --no-color --token $VERCEL_ACCESS_TOKEN -e PIERRE_BRANCH_ID=${
ctx.branch.id
} -e PIERRE_ENVIRONMENT=${isProd ? "production" : "preview"}`,
} --no-color --token $VERCEL_ACCESS_TOKEN`,
{
label: `Creating ${PROJECT_NAME} Deployment`,
env: { VERCEL_ORG_ID, VERCEL_PROJECT_ID }
Expand Down

0 comments on commit 0fdf455

Please sign in to comment.