Netlify build plugin that automatically purges the Cloudflare cache for your zone upon each deploy. Version 1.2.0 is the latest stable release. It supports two authentication methods: API Token (recommended, with granular permissions) and Legacy API Key (full account access). The cache purge is triggered before the deploy but after the build, which is the only timing Netlify allows. The plugin is maintained by a community contributor and is available on npm. It requires environment variables for Cloudflare credentials and zone ID.
npm install netlify-purge-cloudflare-on-deployNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin in netlify.toml and required environment variables.
Ensure your cache is not serving stale content for a short window until the deploy completes.
Switch to using CLOUDFLARE_API_TOKEN instead of CLOUDFLARE_API_KEY and CLOUDFLARE_EMAIL.
Remove the unused set of environment variables to avoid confusion.
Do not set CLOUDFLARE_EMAIL if using API Token.
Verify CLOUDFLARE_ZONE_ID and either CLOUDFLARE_API_TOKEN (recommended) or CLOUDFLARE_API_KEY + CLOUDFLARE_EMAIL are set correctly in Netlify environment variables.
No dependency data recorded yet.