A deployment is the result of building your Project and making it available through a live URL.
This section contains information about making, managing, and understanding the behavior of deployments.
When using these integrations, every push to a branch will provide you with a preview deployment to view your changes.
When merging to the default branch (commonly
master), a production deployment will be made.
To make a preview deployment, use the
To make a production deployment, use the
now --prod command:
There are many use cases for Deploy Hooks, for example, rebuilding your site to reflect changes in a Headless CMS or scheduling deployments with Cron Jobs.
To create a Deploy Hook, visit the settings page of your Project where you can choose the branch to deploy when the HTTP endpoint receives a POST request.
You can find more information about Deploy Hooks in the documentation.
The ZEIT Now API can be used to make deployments by making an HTTP POST request to the relevant endpoint, including the files you wish to deploy as the body.
You can find more information about the Now API in the API Reference.
There are two types of deployment on the ZEIT Now platform: preview and production.
Preview deployments are the default for all deployments. Each time you push to a branch or make a deployment using the
now command, this is a preview deployment.
By making a preview deployment, the preview URL will be updated to reflect that of the latest deployment made.
The preview URL is provided either by the deployment output from Now CLI or on a pull or merge request when using a git integration and contains the name of the user or team to which the Project belongs.
Production deployments are made in two different circumstances. Each time you merge to the default branch (commonly
master) or make a deployment using the
now --prod command, this is a production deployment.
By making a production deployment, the production domain(s) will be updated to reflect that of the latest deployment.
The production domain(s) are defined from the Domains tab of a Project on the ZEIT Dashboard.
The ZEIT Dashboard is the easiest way for you to manage your deployments.
Through the ZEIT Dashboard, you can find a variety of settings; including a Domains tab where you can add custom domains to your Project.
All deployment URLs have two special pathnames:
/_logs to a deployment URL or custom domain, you will be able to see a realtime stream of logs from your deployment build processes and serverless invocations.
These pathnames redirect to
https://zeit.co and require logging in to access any sensitive information. A 3rd-party can never access your source or logs by crafting a deployment URL with one of these paths.
The URL structure of each preview deployment contains the name of the application and a random UID.
Now generates a new UID (and therefore a new deployment), by combining the following information into an internal digest that is looked up within the deployment database:
- The entire deployment configuration from
- The owner ID (either the user ID or team ID, if deploying within a team).
- The description of the filesystem. This includes symlinks, modes, pathnames, and the checksum of each file's contents.
Now ensures that the digest is computed deterministically by sorting and ordering all the inputs involved in the algorithm.
Our lookup excludes deployments that are in an
ERROR state – if a previous deployment matches the digest but failed to build correctly.
There are two ways to force a new deployment to be created when our system would otherwise deduplicate.
- Make any change to any of the parameters considered by the algorithm, listed above. For example, even changing one character in a comment of a source file yields a new deployment.
Force a new deployment by instructing your client to do so.