Resources to help you deploy your Prismic and Gatsby project to one of the many providers that support static sites.
You can deploy and generate automatic builds with Gatsby Cloud. Read our guide to start integrating Gatsby Cloud into your project:
First, make an account or log in, then push your project code to a new GitHub repo and log in with that same GitHub account. Click on New site from Git, select your repository and continue. You should land on step 3, "Build options, and deploy!", here are the settings you need:
Branch to deploy
main, or which-ever branch you prefer
npm run build
That's it; your website should now be live!
Start by creating your Build hooks endpoint on Netlify. In your Netlify site dashboard at Settings > Build & deploy > Continuous deployment > Build hooks. Generate a build hook URL; it'll be similar to the one below:
Now create a Webhook trigger in Prismic. In your Prismic repository's Settings > Webhooks, create a Webhook trigger and add the URL you just copied from Netlify, and that's all you need to add to make your project detect changes and rebuild!
Variables in Netlify
You can also check out the recommended Gatsby services for deploying if you'd like to see more options.
Was this article helpful?
Can't find what you're looking for? Spot an error in the documentation? Get in touch with us on our Community Forum or using the feedback form above.