Skip to main content

Documentation 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.

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 a 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.
Your GitHub account must be connected via OAuth before you can import a project. If you haven’t done so, head to Dashboard → Settings → Integrations and authorize the GitHub OAuth app first. The import API looks for a valid GitHub access token on your account; without it, the request returns 401 Unauthorized.

Steps

1

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.
2

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.
3

Fill in the project configuration

Configure the following fields in the form:
FieldRequiredDefaultExample
Project Name✅ YesRepository namemy-awesome-app
Production Branch✅ Yesmain (or repo default)main
Build CommandNoAuto-detectednpm run build
Start CommandNoAuto-detectednode dist/index.js
Root DirectoryNoRepository root (./)apps/web
Environment VariablesNoDATABASE_URL=postgres://...
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.
If your repository is a monorepo, set the Root Directory to the subdirectory containing your application (e.g. apps/web). The builder will cd into this path before detecting the framework and running your build command. For example, in a Turborepo monorepo with a Next.js app at apps/web, set Root Directory to apps/web.
Environment variables added here are encrypted with AES-256-GCM before being stored. See Manage Environment Variables for full details on how encryption works.
4

Click Deploy

Click the Deploy button to submit the form. The dashboard calls POST /api/v1/projects/import with the following payload:
{
  "repositoryFullName": "owner/repo-name",
  "name": "my-awesome-app",
  "defaultBranch": "main",
  "buildCommand": "npm run build",
  "startCommand": "node dist/index.js",
  "rootDirectory": "apps/web",
  "envs": [
    { "key": "DATABASE_URL", "value": "postgres://..." }
  ]
}
The API handler performs the following actions in order:
  1. Validates the session — checks that the request comes from an authenticated user with a linked GitHub account.
  2. Creates project and deployment atomically — runs a prisma.$transaction that creates both the Project record and an initial Deployment record in a single database transaction. Any environment variables are encrypted and stored as Env records linked to the project.
  3. Registers a GitHub webhook — calls the GitHub API via Octokit to create a webhook on the repository that fires on push events. 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.
  4. Enqueues the first build job — adds a deployment-event job 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.
5

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.

Build docs developers (and LLMs) love