🎈 Welcome to the Marketplace — Explore and discover the ecosystem around DatoCMS, and share your own work with the community!

Vercel

Trigger a build of your website on Vercel directly from the DatoCMS UI, and get a notification of the status of the build when it completes

Vercel is a cloud platform for static sites and Serverless Functions that enables developers to host JAMstack websites and web services that deploy instantly, scale automatically. Their free plan is perfectly compatible with DatoCMS and allows you to publish high-performant static websites.

Warning: this guide assumes you have a working static website project on your machine integrated with DatoCMS. If it's not the case, you can return to the previous sections of this documentation to see how to properly configure the DatoCMS administrative area and how to integrate DatoCMS with your favorite static website generator.

If you are starting now with Vercel and DatoCMS we suggest trying one of our starter projects. Dato will automatically create a brand-new project with all the necessary integrations!

Step 1: Create a new project

Create a new repository on your favorite hosting service. To avoid errors, do not initialize the new repository with README, license, or .gitignore files. You can add these files after your project has been pushed to the hosting service.

Terminal window
$ git init
$ git add .

Commit the files that you've staged in your local repository.

Terminal window
$ git commit -m 'First commit'

At the top of your Git repository's Quick Setup page, click the clipboard icon to copy the remote repository URL. In Terminal, add the URL for the remote repository where your local repository will be pushed.

Terminal window
$ git remote add origin YOUR_GIT_REPOSITORY_URL

Now, it's time to push the changes in your local repository.

Terminal window
git push -u origin main

Now that your project is up and running on the Git hosting service, let's connect it to Vercel.

Step 2: Create a new Vercel project from the Git repo

Now that you have your new repo, we can instruct Vercel to read from it and build our site.

To do that, follow Vercel instructions on how to create a Vercel project. Once you have done you should be able to see your new project on Vercel dashboard.

Step 3: Connect Vercel to your DatoCMS project

By connecting DatoCMS to Vercel, every time your editors press the Publish changes button in your administrative area, a new build process on Vercel (thus a new publication of the final website) gets triggered.

To do that, start by clicking on the "Install this app" button on the top right. You will be redirected to your DatoCMS dashboard, where you will be asked to which project you want to add the integration.

Choose one, and you will be redirected to your project private area. Now you have to connect your project to Vercel.

This is all! Now you can control the build process directly from your DatoCMS private area!

Subscribe to our newsletter! 📥
One update per month. All the latest news and sneak peeks directly in your inbox.
support@datocms.com ©2024 Dato srl, all rights reserved P.IVA 06969620480