Installation Guide

  1. Go to your project in the Cloudflare dashboard and go to Workers & Pages / Site / Settings / Builds & deployments / Deploy hooks. Add a new deploy hook and copy it.
    cloudflare-hooks.png
  2. In the Cosmic dashboard go to Deploy to Cloudflare / Settings and add deploy_url as a Query Parameter with the Cloudflare deploy hook URL set as the value.
    cloudflare-query-params.png
  3. Make the extension available on any Object type on the Object edit page.
    set-object-types.png
  4. Go to any Object type that you added this extension to, and you should now see the "Trigger deploy" button.
    trigger-deploy.png
  5. After you trigger the deployment, you can see if it's working by going to the Site / Deployments page in the Cloudflare dashboard. You should see the status is "In progress".
    cloudflare-building.png

Note: For automatic deployments on content changes, you can add the deploy hook as a webhook. In your Cosmic dashboard go to Bucket > Settings > Webhooks to enable webhooks on your Project.