Skip to content

Commit

Permalink
🚀 Switch CI deployment to use npx vercel instead of local vercel (#np…
Browse files Browse the repository at this point in the history
…x-vercel)

Summary: Switching CI deployment to use `npx vercel` instead of local vercel.

Highlights:

• Removed local `vercel` binary reference in `.pierre/ci/utils/vercel.ts`.
• Updated deployment and inspection commands to use `npx vercel`.
• Removed `vercel` from `devDependencies` in `package.json`.

Read more: https://pierre.co/hey/hey/npx-vercel
  • Loading branch information
Yoginth authored and Pierre committed Sep 27, 2024
1 parent eceed5d commit 78321a6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1,328 deletions.
6 changes: 2 additions & 4 deletions .pierre/ci/utils/vercel.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Icons, type JobContext, annotate, run } from "pierre";

const vercel = "./node_modules/.bin/vercel";

export interface VercelContext {
VERCEL_PROJECT_ID: string;
PROJECT_NAME: string;
Expand All @@ -25,7 +23,7 @@ export const Job =
await run("rm -rf .pnpm-store");

const { stdout } = await run(
`${vercel} deploy --scope ${VERCEL_SCOPE} ${isProd ? "" : "--no-wait"} --yes ${
`npx vercel deploy --scope ${VERCEL_SCOPE} ${isProd ? "" : "--no-wait"} --yes ${
isProd ? "--prod" : ""
} --no-color --token $VERCEL_ACCESS_TOKEN --env GIT_COMMIT_SHA=${
ctx.branch.latestSha
Expand Down Expand Up @@ -89,7 +87,7 @@ export const Job =
}

const { exitCode } = await run(
`${vercel} inspect ${previewURL} --scope ${VERCEL_SCOPE} --logs --wait --timeout=15m --no-color --token $VERCEL_ACCESS_TOKEN`,
`npx vercel inspect ${previewURL} --scope ${VERCEL_SCOPE} --logs --wait --timeout=15m --no-color --token $VERCEL_ACCESS_TOKEN`,
{ label: ` ${PROJECT_NAME} Deployment Build`, env }
);

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"devDependencies": {
"@biomejs/biome": "^1.9.2",
"husky": "^9.1.6",
"pierre": "^2.1.9",
"vercel": "^37.6.0"
"pierre": "^2.1.9"
},
"packageManager": "pnpm@9.1.4",
"engines": {
Expand Down
Loading

0 comments on commit 78321a6

Please sign in to comment.