Vercel

Deploy a published site to a Vercel project of your own, live at that project's address and domains.

With a Vercel account connected, a site can be deployed to a project of yours. Each send is a production deployment of that project.

Deploy a site to a project

Deploy a published site to a Vercel project you have · 0:07
Description

A website that is published as Version 1, with a Vercel account connected. In the Publish dialog, under Also send to, the search field lists every project the connected accounts hold; typing brightside-site narrows it to one, and clicking it adds the project and deploys the site at once. The row shows a link to the deployment, marked Building.

  1. Publish the site. A destination is sent a published version.
  2. In the Publish dialog, under Also send to, click New Vercel project. A project named after the site is made in your team and the published version is deployed to it at once.
  3. To use a project you have, type in the field below the buttons: it lists every project of every connected account. Pick one and the site is deployed there.

Later versions go with Send version N.

The row links to the deployment. It says Building until Vercel has it ready, usually within a minute.

What a deployment is

The filesThe same static site PopCraft hosts: a page of HTML per screen, site.json, the pc/ scripts, assets/.
Where it is liveThe project's own address and any domain you gave the project in Vercel.
Earlier deploymentsKept by Vercel. Roll back there, or send an earlier version from PopCraft.
The project's settingsLeft as they are. A new project is created with no framework: the site is static.

Sending counts toward your Vercel plan like any other deployment.

One account, many projects

A connection is the account. Each file picks its own team and project, so several files can deploy through one connection.

Ask the AI agent

Deploy this to my Vercel.

Deploy it to the brightside-site project.

With no project in mind, the agent makes one named after the site (create: true). Otherwise it lists the teams and projects and asks which when there are several. It asks you to approve before it creates a project or deploys.

ToolWhat it does
list_integration_resourcesThe teams, then the projects, of a connected account.
add_site_destinationChoose a project, or make one (create: true, or createNamed in a team). Asks first.
deploy_siteDeploy a published version. Asks first.

Remove a destination

Click the bin beside it. PopCraft stops deploying there; the project and its deployments stay on Vercel.

When something goes wrong

What you seeWhat to do
A project or deployment is refused with 403The token is scoped to another team. Make one for the team that should own the project.
The row stays BuildingVercel is still at it. Open the link to see its progress; the row catches up the next time the dialog opens.
The deployment failedOpen the link: Vercel's build log says why. A static site has nothing to build, so it is usually a plan limit.

Command line and API

popcraft run --ui integration.deploy
curl -X POST -H "Authorization: Bearer $POPCRAFT_TOKEN" https://popcraft.app/api/v1/files/KEY/site/destinations/DESTINATION_ID/deploy

Add a destination, making a new project named after the site:

curl -X POST -H "Authorization: Bearer $POPCRAFT_TOKEN" -H "content-type: application/json" \
  -d '{"create": true, "capability": "deploy", "provider": "vercel"}' \
  https://popcraft.app/api/v1/files/KEY/site/destinations

The token needs the sites:publish scope.

The site's database and sign-in

When the site has a database (Neon or Supabase), each deployment first sets the project's environment variables, encrypted, for production and preview: DATABASE_URL, and with sign-in SITE_AUTH_KIND, SITE_AUTH_URL and the keys it needs. A Next.js export of the site deployed to the same project reads them as they are. A repository (GitHub) is never sent them.