Prismic Webhooks
A Prismic Webhook allow you to automatically or manually trigger a deployment process in Netlify or Vercel if any post is published or unpublished OR for any other events in Prismic.
Prismic Webhooks
Webhooks are the events that are triggered whenever a change is published on your Prismic repository and the API is updated.
I use Vercel as the example and I guess it might be quite similar for Netlify or any other cloud service.
Steps:
Deploy Hook | Vercel
Prismic Webhook
- Copy the webhook URL you created in Vercel in the URL field of the Prismic webhook
- The Secret field is optional in the Prismic webhook. If you set it, Prismic will send the content to your server, so that you can verify that the request is coming from prismic.io.
- After successful creation of the webhook, you can manually trigger it and can also see the logs.
Prismic Webhook will be triggered automatically based on the triggers you selected when you created the webhook.
Prismic Webhooks
That's it! If you followed the above steps and successfully created a Prismic webhook, it should trigger the deploy hook which will start the build process in Vercel or any platform where you created the deploy hook.
#skyisthelimit
If you have any questions, please post them in the comments section.
Related Articles
Build a Blog using NextJS & Prismic
Learn and build a blog using NextJS Prismic Blog starter template as quickl... Read Full Article
Dec 1, 2020| 15 min read
Build custom themes using Theme UI
Build themes for any JavaScript application using Theme UI. Read Full Article
Oct 3, 2020| 5 min read
Build a Weather Application Using React
This weather application provides current and 24 hour 7-day weather forecas... Read Full Article
Jul 31, 2020| 10 min read