Importing a project is the starting point for every deployment on Deploy Your App. The platform fetches your GitHub repositories, lets you configure project settings, and then creates aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/deploy-your-app/llms.txt
Use this file to discover all available pages before exploring further.
Project record alongside an initial Deployment record — all in a single database transaction. A GitHub webhook is registered automatically so every subsequent push to your production branch triggers a new deployment without any manual action.
Steps
Navigate to the Import page
In the dashboard, click New Project or go directly to
/dashboard/import. The page is split into two panels: a searchable list of your GitHub repositories on the left, and a project configuration form on the right.Browse and select a repository
The dashboard fetches your repositories from
GET /api/v1/repository using paginated requests (10 repos per page). Use the search bar to filter by repository name or full name (e.g. owner/repo). Click the Import button next to the repository you want to deploy.Once you select a repository, the configuration form appears on the right panel. The Project Name and Production Branch fields are pre-filled from the repository’s metadata.Fill in the project configuration
Configure the following fields in the form:
The Build Command, Start Command, Root Directory, and Environment Variables fields are grouped under Advanced Settings and collapsed by default. Click Advanced Settings to expand them.Environment variables added here are encrypted with AES-256-GCM before being stored. See Manage Environment Variables for full details on how encryption works.
| Field | Required | Default | Example |
|---|---|---|---|
| Project Name | ✅ Yes | Repository name | my-awesome-app |
| Production Branch | ✅ Yes | main (or repo default) | main |
| Build Command | No | Auto-detected | npm run build |
| Start Command | No | Auto-detected | node dist/index.js |
| Root Directory | No | Repository root (./) | apps/web |
| Environment Variables | No | — | DATABASE_URL=postgres://... |
Click Deploy
Click the Deploy button to submit the form. The dashboard calls The API handler performs the following actions in order:
POST /api/v1/projects/import with the following payload:- Validates the session — checks that the request comes from an authenticated user with a linked GitHub account.
- Creates project and deployment atomically — runs a
prisma.$transactionthat creates both theProjectrecord and an initialDeploymentrecord in a single database transaction. Any environment variables are encrypted and stored asEnvrecords linked to the project. - Registers a GitHub webhook — calls the GitHub API via Octokit to create a webhook on the repository that fires on
pushevents. The webhook delivers payloads to your platform’s webhook endpoint (/webhook/:projectId) and triggers automated deployments on every push. If a webhook already exists for the repository, the registration step is skipped silently. - Enqueues the first build job — adds a
deployment-eventjob to the deployment queue, passing the project configuration, branch, environment variables, and deployment ID to the builder worker.
The GitHub webhook is registered automatically during import. From this point on, every push to your Production Branch will trigger a new deployment with no further configuration required. You can still trigger manual redeployments at any time from the project dashboard by calling
POST /api/v1/projects/:id/deploy.Watch deployment progress in real time
After submitting the form, you are redirected to the Projects page. Click your new project to open the project detail view, then click the deployment to open the log stream. Build output is streamed live as the worker clones the repository, detects the framework, builds the Docker image, and starts the container.Log lines prefixed with
[SYSTEM] indicate platform-level events (e.g. [SYSTEM] Repository cloned, [SYSTEM] Dockerfile prepared (nextjs)). Raw Docker and git output appears without a prefix. See View Deployment Logs for a full breakdown of build stages.Learn more
Environment Variables
Add, update, and delete AES-encrypted environment variables for your project, and understand how they are injected into the Docker build context.
Build Commands Reference
Learn how the platform auto-detects Next.js, Vite, and Node.js projects and what build and start commands are used by default.