How to Deploy a Project with Vercel
Last updated
Last updated
Go to the .
Sign in using your GitHub, GitLab, or Bitbucket account (GitHub is recommended).
Grant Vercel the necessary permissions to access your GitHub account.
Once your account is created, you will be automatically logged in, and you can proceed with the deployment process.
If you already have a project to deploy, make sure it's uploaded to a GitHub, GitLab, or Bitbucket repository.
Vercel supports various frameworks, including static sites and Server-Side Rendering (SSR) frameworks like Next.js, React.js, Svelte, and Vue.js.
Use the following commands to push your project to GitHub:
In the Vercel dashboard, click on the New Project button.
You will see a list of repositories linked to your GitHub, GitLab, or Bitbucket account. Select the repository you want to deploy.
Click Import to import the project.
During the import process, you can customize deployment settings.
You can also configure build and environment variables. For Next.js, the build settings are automatically detected.
Vercel will automatically set the appropriate build command and output directory for your project.
Example: For a Next.js project, the default build command is npm run build
, and the output directory is .next
.
Once the setup is complete, Vercel will automatically build and deploy your project.
After the deployment is done, you can view your site at the default domain provided by Vercel (e.g., https://<project-name>.vercel.app
).
Since Vercel is linked to GitHub, every time you push new commits to the main
branch, Vercel will automatically deploy the changes.
Vercel provides a default domain in the format https://<project-name>.vercel.app
.
In the Vercel dashboard, select the deployed project and go to the Domains tab.
Click Add Domain and enter the custom domain you want to use.
To link your custom domain, update your DNS settings:
Add a CNAME or A record with your DNS provider, pointing to Vercel's IP address.