Skip to content

Deployment ​

Vercel builds and serves the two docs sites from the main branch and from each pull request.

Projects ​

Each site has one Vercel project in the shadow-smiths-projects team.

Settingurn-forge-knowledgeurn-forge-docsSource
Root Directoryknowledgeproducts/docsVercel project settings
FrameworkVitePressVitePressvercel.json in the site folder
Install Commandnpm install --ignore-scriptsnpm install --ignore-scriptsvercel.json in the site folder
Output Directory.vitepress/dist.vitepress/distvercel.json in the site folder
Ignored Build StepignoreCommandignoreCommandvercel.json in the site folder
Node.js version24.x24.xengines.node in the package.json of the site

Vercel reads vercel.json and package.json from the Root Directory of the project. The values in these files replace the values in the project settings. The Root Directory is the only setting that a file cannot hold. When you change the Root Directory in Vercel, change this table in the same pull request.

Install ​

The Install Command skips the install scripts of npm. The root prepare script runs husky. On Vercel, the shell cannot find husky while npm installs the packages. Husky only installs git hooks, but a Vercel build does not use git hooks.

Output ​

VitePress writes each site to .vitepress/dist in the folder of the site. When the Output Directory is empty, Vercel tries to find a dist folder. For this reason, each site sets the Output Directory.

Skipped builds ​

The free plan of Vercel allows 100 deployments a day, and each push deploys both sites. So each site skips a build when its files did not change.

The ignoreCommand in vercel.json compares the commit with the last deployment of the branch, in VERCEL_GIT_PREVIOUS_SHA. It skips the build when nothing changed in the site folder, the root package.json or the root package-lock.json. When there is no last deployment, or the clone does not have its commit, the command exits with 1, and Vercel builds the site. A force-push removes the commit of the last deployment, so this case happens after each force-push. Vercel fails a deployment when the command exits with any code other than 0 or 1. The doctor check fails when a site does not set ignoreCommand.

Status ​

Vercel reports each deployment to GitHub as a commit status with the context Vercel. A failed status shows on the commit and on its pull request. To read the statuses of a commit, run this command:

sh
gh api repos/heyshadowsmith/urn-forge-next/commits/<sha>/statuses

The deployment-manager skill finds why a deployment failed, or why a site does not show the latest main. It redeploys a commit only after the human approves.