# Your first deploy

The next step is shipping a real app. By the end of this page, your code is live at a Lessly URL — from the dashboard, or by asking your agent. Pick a track with the toggle on each step; your choice sticks across the page.

> **NOTE**
> A Lessly workspace is required. If you skipped it, [sign up at lessly.com](https://app.lessly.com/signup) and come back.

## Prerequisites

- A Next.js app in a git repo. Any GitHub repo works; a fresh `create-next-app` is fine.
- For the agent path: the Lessly MCP installed in your agent — see [Install](/get-started/install) — and your agent open and connected to your Lessly workspace.

## Step 1 — Connect your repo

### UI

In `app.lessly.com`, create a new app and connect the GitHub repo you want to deploy.

### MCP

Open your repo in your agent. In Claude Code, that means `cd` into the project and start a session. In Claude Desktop or Cursor, open the project folder.

## Step 2 — Deploy

### UI

Choose the branch to ship (`main`) and click **Deploy**. Lessly detects Next.js, picks the build command, and streams the build log as it runs.

### MCP

Paste this into your agent:

```text
Deploy my main branch to production.
```

The agent calls `deployment_service_create` — it reads your repo, detects Next.js, picks the right build command, and starts the deploy, streaming status as the build runs. The agent needs a token with deploy access to the app.

## Step 3 — Verify the site is live

### UI

When the build finishes, the app's page shows the live production URL. Open it in your browser — your app is live.

### MCP

When the agent reports success, ask:

```text
What's the URL of my latest deployment?
```

The agent calls `deployment_deployment_get` and returns the production URL. Open it in your browser — your app is live.

## What you just did

You shipped a production deploy without writing a config file, a Dockerfile, or a YAML pipeline. A couple of clicks — or one sentence to your agent — became a build, a deploy, and a URL.

## What to do next

- *"Promote this deploy to the apex domain."*
- *"Set the `DATABASE_URL` environment variable on production."*
- *"Show me the build logs for the last failed deploy."*
