CF Pages - creating deployment previews for CMS

Hi everyone,

Our CMS (Contentful) has a functionality of content previews. Some build and deployment tools like Netlify has Contentful plugin that creates a new deployment preview when CMS user wants to preview the content.

Right now in CF Pages all of the deployments previews are created, when there is new commit added to Github repository. Is there a way though to create them programatically, can we use any API endpoint to do that?

If not - are there any plans to create CF Pages - Contentful plugin ?

Thanks a lot in advance !


We have deploy hooks which are meant for this purpose, you can read about them here:

And the blog post:

thanks a lot for response.
We are using deploy hooks to rebuild the content from Contentful.

Please correct me if I am wrong - but the deploy hooks are used for deploying to production, is there a way to create deployment previews with them?

Just to clarify:
We want to have similar deploy previews functionality for CMS as for Github commits.
Let’s consider this scenario:

  • User of the CMS is making changes to the content. Before publishing they want to preview the changes on the page.
  • They click preview in Contentful and then there is API call to CF Pages to create new deploy preview. - CF Pages is rebuilding project with Contentful preview API and creating new staging preview link.
  • User get the preview link and can see how their changes looks on the page.

It will be different from just rebuilding the page to Production, since we don’t want those changes to go live yet.

You can choose the branch for a deploy hook, with this you can make previews. I’m guessing Contentful will have a way for you to set a production and preview deploy hook.
Screenshot 2022-07-06 at 12.28.08

Ok, that is great thank you !

I just thought that no matter what branch I will choose it will still build this branch to production. But if this is working this way, then it is absolutely fine !

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.