Getting started
Your first deployment
Push to deploy, watch the build, preview a branch and promote it to production.
Deploy to production
Push to the project's production branch:
git push origin mainWithin seconds a deployment appears in Cloud under Deployments and on the project's page. It moves through:
| Status | |
|---|---|
building | Installing dependencies and building. Open the deployment to follow the Build logs. |
deploying | Publishing: creating the server function (Next.js) and the route to it. |
ready | Serving. Production deployments take over the production hostname and custom domains. |
error | The build or publishing failed. The build logs show why. |
Later pushes that don't change anything the project builds from are recorded as skipped instead; see Skipped pushes.
When it's ready, Visit opens it. Every deployment has its own hostname, and production also has a stable one:
https://<project>-<id>-<org>.deployments.dev.gov.vin this deployment
https://<project>-<org>.deployments.dev.gov.vin productionPreview a branch
Push any other branch:
git switch -c new-header
git push -u origin new-headerThat builds a preview deployment with its own hostname, using the project's preview environment variables. Production doesn't change.
Promote or roll back
From a ready deployment's ⋯ menu:
- Promote to production switches production (and custom domains) to it immediately, without rebuilding.
- Roll back to this deployment does the same for an earlier production deployment.
- Redeploy builds the same commit again as a new deployment.
See Preview and production for the details.
Next steps
-
The command line does all of this from your terminal:
si deploypushes and follows the build, or uploads uncommitted changes as a preview. -
Environment variables for configuration and secrets.
-
Custom domains for your own hostname.
-
Crons for scheduled work.