Deployment
Learn how to deploy your Dirstarter project to Vercel
Dirstarter is built with Next.js, which means you can deploy it to any platform that supports Next.js applications. Since it is a framework built by Vercel, you will get the best developer experience and performance when deploying to Vercel.
This guide will walk you through the deployment process for Vercel. We'll be adding more deployment guides for other platforms in the future.
Prerequisites
Before deploying your Dirstarter project, make sure you have:
- A Git repository with your project
- An account on Vercel
- Your project's environment variables configured for production
Deployment Steps
Push your code to a Git repository (GitHub, GitLab, or Bitbucket)
Go to Vercel Dashboard and click "Add New Project"
Import your Git repository
Configure your project settings:
- Framework Preset: Next.js
- Build Command:
npm run build
(oryarn build
if using Yarn) - Output Directory:
.next
- Install Command:
npm install
(oryarn install
)
You can leave the default settings if you're not sure what to do.
Add your environment variables:
Click "Deploy" and your project will be deployed.
Automatic Deployments
Vercel automatically deploys your application when you:
- Push to the main branch
- Create a new pull request
- Push to a branch with a preview deployment enabled
Every pull request gets a unique preview URL, making it easy to test changes before merging to production.
Custom Domain
- Go to your project settings in Vercel
- Navigate to the "Domains" section
- Add your custom domain
- Follow the DNS configuration instructions
Last updated on