⚠️ This lesson is retired and might contain outdated information.

Set Up a Deploy Webhook in Cloudflare Pages

Obinna Ekwuno
InstructorObinna Ekwuno
Share this video with your friends

Social Share Links

Send Tweet
Published 3 years ago
Updated 2 years ago

In this lesson, you will set up a deploy webhook in Cloudflare Pages and then configure Contentful to trigger the hook on all events.

Instructor: [0:01] To create a deploy hook, we'll head over to Settings, and select Build and Deployments. If you scroll down, you can add a deploy hook. To set up with deploy hook for our Contentful sites, we would have to name the deploy hook, contentful-sites. The name can be anything you want, but just to keep the format, we will name it contentful-sites, and set it to trigger a build when changes are made to the main branch.

[0:33] Now, we would add that deploy hook and copy this, and head over to Contentful. In Contentful, you can get to the webhooks settings by going to Settings and then selecting Webhook. We can call this webhook, egghead-site-hook. Then we paste in our hook URL. You can also set this hook to trigger for certain events or trigger for all events. We'll leave the default settings as is, and then click Save.

[1:11] Now that we've set up this deploy hook, let's make a change to the content of the Cloudflare pages. Let's say, "Pages are awesome." If we publish this change and head over to Pages dashboard, we would see that this automatically triggers a build. When this build is over, if we click on the URL of the build, we can see that our change has been deployed.

egghead
egghead
~ an hour ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today