Deployment & Rebuilding

With Prismic and Next, it's incredibly easy to deploy a blazing-fast, dynamic site. This guide will show you how to deploy a statically-generated Next site for free on Vercel in under ten minutes.

Connect to GitHub

On GitHub, create a new repo for your project. Make sure all of your local changes are committed, then push your project to GitHub.

Connect to Vercel

Make an account or log in. Then, click "Import Project." Then continue with "import git repository."

Enter the URL of your GitHub repo. If necessary, adjust your GitHub app settings to allow Vercel access to the repo.

Click "deploy." It will take a moment for your site to build.

🎉 Now your site is online!

However, if you included any statically generated pages in your project, you need to set up webhooks to update those pages when there are changes in your Prismic repo.

Set up Webhooks

Webhooks tell Vercel to rebuild your site when there are changes. Learn more in our guide to webhooks.

In your Vercel project, go to "Settings," then "Git Integration." Scroll down to "Deploy Hooks." Create a hook for your main git branch (note: your main branch could also be called master or something else). This will create a URL. Copy the URL.

Go to your Prismic repository, visit "Settings," and then click "Webhooks." Create a new webhook by choosing a name and pasting in the webhook URL you just copied from Vercel. You can leave the "Secret" empty.

🎣 Now, whenever you change your content in Prismic, the changes will be reflected on your site.

9 Rue de la Pierre Levée, 75011 Paris