Learn

Deploying your first project

Vercel

From a Git repo to a .vercel.app URL, step by step.

You have a Git repo and you want to see it running on a real URL. This lesson walks you through both available paths: the Vercel dashboard (fast, visual) and the CLI (convenient from the terminal). Both lead to the same result: a working .vercel.app URL within a few minutes.

Via the Vercel dashboard (Git import)

This is the fastest path for a first deployment. Everything happens in the browser.

1. Create an account and connect your Git

Go to vercel.com/signup and sign up with GitHub, GitLab, or Bitbucket. Vercel will use that account to access your repos.

2. Import a repo

In the dashboard, click Add New... > Project (button in the top right), then Import Git Repository. Vercel lists all the repos your Git account has access to. Select the one you want to deploy.

3. Configure and deploy

On the configuration page, Vercel automatically detects your framework (Next.js, Vite, SvelteKit, etc.) and pre-fills the build commands. In most cases, you do not need to change anything.

Click Deploy. Vercel builds and deploys your project. The first build takes 1 to 3 minutes depending on the project size.

Via the Vercel CLI

The CLI is useful when you want to deploy without leaving your terminal, or when you want to automate deployments in a pipeline.

1. Install the CLI

shell
npm i -g vercel

The package is called vercel (no prefix). Once installed, the vercel command (or its alias vc) is available globally.

2. Log in

shell
vercel login

The CLI opens a link in your browser. Authenticate with the same account as your dashboard. Back in the terminal, you will see a confirmation message.

3. Deploy a preview

From your project folder:

shell
vercel

The first time, the CLI asks a few questions: target account, project name, root folder. It detects your framework and configures the build automatically. At the end, it prints a unique preview URL.

4. Push to production

shell
vercel --prod

This command deploys to the production branch and updates the stable URL of your project (e.g. https://my-project.vercel.app).

Preview deployments: every PR gets its own URL

Once your repo is connected to Vercel via the dashboard, every pull request (or merge request) automatically triggers a preview deployment. Vercel posts the URL directly as a comment on the PR in GitHub, GitLab, or Bitbucket.

The logic is simple:

  • main branch (or master) - production deployment, serves your real URL.
  • Any other branch - preview deployment, unique URL of the form <project>-git-<branch>.vercel.app.

You can change the production branch in Project Settings > Environments > Production > Branch Tracking.

Finding your production URL

Three ways to find it:

  1. In the Vercel dashboard, the project card at the top: the clickable URL below the project name.
  2. In the project's Deployments tab: the latest deployment labeled "Production".
  3. Via the CLI with vercel inspect followed by the deployment URL, or simply vercel list to see recent deployments.

Sources

Related

See also · gitConnect your repo to GitHub

Concepts-ponts

Concept-pont · Git push, GitHub, et deploiement automatique

Pousser un commit sur GitHub n'est plus juste 'sauvegarder' : c'est aussi le declencheur du deploy continu et la source d'un graphe d'historique visualisable dans l'IDE.

Check off steps to unlock what comes next

Back to course