Skip to content

How to setup Netlify

Joseph Pereniguez edited this page Aug 17, 2023 · 8 revisions

Deploy this starter with one click on Netlify by creating your account and connect your repository:

Deploy to Netlify

1. 🚀 Connect your repository

Connect your Github repository when creating your Netlify project

connect github

2. 🔒 Add your environment variables

create env

Make sure you have all the following variables. If you don't have your Prismic secrets yet, you can follow the Prismic setup steps documented here.

env variables

3. 🖲️ Build commands

Define your build command as follow:

Capture d’écran 2023-08-17 à 16 58 38

4. 🪝 Create a Webhook (optional)

In order to trigger a deployment every time you update your content on Prismic, you need to create a webhook. To do so, create one in the continuous deployment section.

create webhook webhook

You can name it "Prismic" and copy the generated url then paste it on Prismic in the webhook section.

Capture d’écran 2023-08-17 à 17 02 42

If it's correctly connected, once you click on the trigger button, a deployment should start on Netlify and you should get a 200 status code in the Prismic webhook logs.

Prismic webhook