Skip to content

A Vercel deployment results from a successful build of your Project. The build emits files that are compatible with the Build Output API, a file-system-based specification for a directory structure that utilizes all of the Vercel platform features, such as Serverless Functions, Edge Functions, routing, and caching.

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 deploy your projects to Vercel in four different ways:

The most common and easiest method to create a deployment on Vercel is via 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:

This deployment method works for static site generators and applications created using Next.js, React, Svelte, Vue, etc.

Deploying your application using Git on Vercel 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 main branch to automatically create a Production Deployment

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.

Vercel CLI allows you to deploy your Projects directly from the Command Line Interface (CLI). You can use this deployment method whether your project is connected to a Git repository or not.

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.

vercel

Making an initial deployment with the vercel command.

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.

vercel --prod

Making a production deployment with the vercel command.

Deploying with Vercel CLI is beneficial in cases when you are:

  • Integrating third-party services like Slack to monitor deployments in Slack channels
  • Creating custom workflows such as GitHub actions with your Project
  • Using existing CI/CD pipelines and would like to integrate your Vercel deployment in a complex workflow

See the Vercel CLI documentation for other configuration options and more information.

Deploy Hooks are another way of creating deployments on Vercel. However, a connection to a Git repository is still necessary in order to use Deploy Hooks.

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 GET or 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 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 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 API endpoint in the API reference.