A Vercel Deployment results from a successful build of your Project.
When you create a deployment, Vercel automatically adds a new and unique Generated URL. You can visit this URL to preview your changes in a live environment.
You can also enable visitors to leave feedback on your Deployments with by adding the Vercel Toolbar package to your projects. Learn more about the Vercel Toolbar below.
You can deploy your projects to Vercel in four different ways:
The most common way to create a Deployment on Vercel is through pushing code to Git repositories.
Creating an automatic Deployment begins by importing a Git repository on Vercel. This repository can either be private or public. To setup a Git repository, click the New Project button from the Vercel dashboard and select one of the following Git providers:
Deploying your application using Vercel's Git integration gives you:
- Simplified collaboration through pull requests or merge requests
- The ability to test new features and changes using Preview Deployments before merging to the
mainbranch to automatically create a Production Deployment
- The ability to receive live feedback in preview environments with the Comments feature (on supported Git providers).
Learn more with our Deploying a Git repository guide.
If you want to initiate Deployments based on external events in your Git repo, you can use Deploy Hooks.
For a new Project, the first deploy will ask to link your local directory to the Vercel Project. This is done by running the
vercel command in your local project directory.
Upon creating the first Deployment for a Project, the
vercel command creates a Production Deployment.
After running this command, a
.vercel directory is added at the root of your project folder. It contains both the organization and project
ID. Vercel CLI automatically detects the framework your project is using.
After the initial step, you can run the
vercel command again to create a Preview Deployment. To create a Production Deployment, use the
vercel --prod command.
You can use the Vercel CLI to create custom CI/CD workflows and integrate into your existing pipelines.
Further, when using
vercel build and
vercel deploy --prebuilt, you can prevent giving access to source code by only uploading the generated build outputs to Vercel.
See the Vercel CLI documentation for other configuration options and more information.
The Deploy Hooks method is useful when the changes in an application depend on external events. If these changes are related to content and are made directly in a Headless Content Management System (CMS) or database, you may want to trigger Deployments without touching code. For example, you may want to trigger a deployment when a new blog post is published or when an existing blog post is updated.
To use this deployment method, you have to generate a URL that accepts HTTP
POST requests to trigger Deployments and re-run the Build Step without needing to push a new git commit. The URL generated is unique for every project.
See the Deploy Hooks documentation for more information.
The Vercel Toolbar appears on all Preview Deployments by default, and can be added to any Deployment using our NPM package.
It enables your team to:
- Leave feedback on your production environment with Comments
- Navigate to useful dashboard pages
- Share your Deployment
While logged into Comments in a preview deployment, you can navigate to many of the project and deployment settings by:
- Selecting the Menu icon in the Vercel Toolbar (
- Entering k (
ctrl+kon Windows). See the section below if your app already implements a k shortcut
Doing so will open a menu that allows you to navigate to useful pages, such as:
If your app already has a k (
ctrl+k on Windows) feature, you can still open your menu by:
event.preventDefault()to the handler that toggles the menu, to prevent the deplyment's k menu from opening
- Using ⇧k (
ctrl+shift+kon Windows) to open the deployment's k menu
Deployments with the Vercel Toolbar enabled, and all Preview Deployments, have a Share button which can be used to share your Deployment's generated URL.
If you're on an Enterprise team, you will be able to see who shared deployment URLs in your audit logs.
The Vercel REST API is used to create Deployments by making an HTTP
POST request to the relevant endpoint. The request's body will include all the files you want to deploy. You will have to generate a
SHA for each file and upload using the Vercel REST API.
This deployment method is helpful for projects that use a custom workflow and add custom domains to a multi-tenant application or integrate a third-party service that is not currently supported by the Vercel platform.
Find more information about the Vercel REST API endpoint in the API reference.
When you deploy your website to Vercel, the platform generates multiple outputs as a result of your build. Those outputs could be:
- Edge Middleware
- Functions (Serverless Functions or Edge Functions)
- ISR Functions
The deployment summary provides a detailed overview of all these outputs, organized by the type. You can use this summary to understand the output of your build and determine what's being deployed.
To access the deployment summary, select your deployment from your project's Deployment tab. Under Deployment Status, expand the Deployment Summary tab.
In the deployment summary, you can see a list of all the artifacts generated from your build and specific information about them.
- Edge Middleware: matcher
- Static Assets: name and size
- Functions: type, name, runtime, size and region
- ISR Functions: name, runtime, size and region. ISR functions are grouped by related path
You can also see the time it takes to deploy your application, and the framework when available.