{"id":15715754,"url":"https://github.com/planxnx/netlify-plugin-cloudflare-pages-deploy","last_synced_at":"2025-10-14T11:07:24.952Z","repository":{"id":191425794,"uuid":"684728094","full_name":"Planxnx/netlify-plugin-cloudflare-pages-deploy","owner":"Planxnx","description":"An awesome plugin to make you Netlify as a CI/CD tool for Cloudflare Pages. Deploy your static site to Cloudflare Pages from Netlify.","archived":false,"fork":false,"pushed_at":"2025-04-12T12:55:18.000Z","size":41,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T03:15:42.376Z","etag":null,"topics":["cicd","cloudflare","cloudflare-pages","cloudflare-workers-site","hosting","netlify","netlify-plugin","netlify-plugins","react","svelte","vite"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/netlify-plugin-cloudflare-pages-deploy","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Planxnx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-29T18:22:51.000Z","updated_at":"2025-04-12T12:55:21.000Z","dependencies_parsed_at":"2023-08-29T22:02:29.315Z","dependency_job_id":"ecbd2472-c53b-4e61-bee8-960d71d3d87e","html_url":"https://github.com/Planxnx/netlify-plugin-cloudflare-pages-deploy","commit_stats":null,"previous_names":["planxnx/netlify-plugin-cloudflare-pages-deploy"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Planxnx/netlify-plugin-cloudflare-pages-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planxnx%2Fnetlify-plugin-cloudflare-pages-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planxnx%2Fnetlify-plugin-cloudflare-pages-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planxnx%2Fnetlify-plugin-cloudflare-pages-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planxnx%2Fnetlify-plugin-cloudflare-pages-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Planxnx","download_url":"https://codeload.github.com/Planxnx/netlify-plugin-cloudflare-pages-deploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planxnx%2Fnetlify-plugin-cloudflare-pages-deploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019054,"owners_count":26086512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","cloudflare","cloudflare-pages","cloudflare-workers-site","hosting","netlify","netlify-plugin","netlify-plugins","react","svelte","vite"],"created_at":"2024-10-03T21:42:46.255Z","updated_at":"2025-10-14T11:07:24.921Z","avatar_url":"https://github.com/Planxnx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare Pages Deploy Plugin\n\n**Deploy your static site to [the Fastest web hosting network in the world ⚡️](https://pages.cloudflare.com/) from [the Greatest DX web hosting platform 🚀](https://netlify.app/).**\n\n[![NPM](https://img.shields.io/npm/v/netlify-plugin-cloudflare-pages-deploy.svg)](https://www.npmjs.com/package/netlify-plugin-cloudflare-pages-deploy)\n\n\u003e An awesome plugin to make you Netlify as a CI/CD tool for Cloudflare Pages\n\n## What is this?\n\nThis is a simple plugin for Netlify to deploy your static site to Cloudflare Pages. This plugin is suitable for making CI/CD with Netlify, but hosting your static site on Cloudflare Pages.\n\n## Why\n\nCause Netlify has a great Developer Experience CI/CD platform for many javascript frameworks.\n\n- It's easy to configure.\n- Widely runtimes and package manager supports.\n- Multiple build environment and deployment scopes Eg. `Production`, `Deploy Previews` and `Branch deploys` (separated for each branches)\n- Great build caching and build time.\n- There are many ready-to-integrate plugins (and local customized plugin supports)\n\nBut Cloudflare Pages is lightning fast ⚡️ and has much better network latency than Netlify. Your sites will deploy on Cloudflare's edge network that's the fastest network in the world.\n\nSee more about: [Cloudflare Pages is Lightning Fast\n](https://blog.cloudflare.com/cloudflare-pages-is-lightning-fast/)\n\n## How it works?\n\nThis plugin is using [Cloudflare Wrangler](https://developers.cloudflare.com/workers/wrangler) for under-the-hood to deploy your site to Cloudflare Pages.\nIt will run `$ wrangler pages deploy \u003cPUBLISH_DIR\u003e --project-name=\u003cPROJECT_NAME\u003e --branch=\u003cBRANCH\u003e` command after Netlify build your site.\n\n## How to use?\n\n### Installation\n\n```sh\n# npm\n$ npm install -D netlify-plugin-cloudflare-pages-deploy\n\n# yarn\n$ yarn add -D netlify-plugin-cloudflare-pages-deploy\n\n# pnpm\n$ pnpm add -D netlify-plugin-cloudflare-pages-deploy\n\n# bun\n$ bun add -D netlify-plugin-cloudflare-pages-deploy\n```\n\n### Inputs\n\n- `package_exec`: Package exec to use Eg. `npx`, `pnpx` or install `wrangler` to devDeps and use `npm`, `yarn`, `pnpm` and `bun` instead (caching support and recommended this) Default: `npx`\n- `deploy_target_branch`: Deploy target branch. For production deploy, use `production` in this config. Default: use netlify current deploy branch\n\n### Setup\n\n0. Prepare your Cloudflare Page project via `wrangler`\n\n```sh\n$ npx wrangler pages project create \u003cPROJECT_NAME\u003e --production-branch=main\n```\n\n1. Add Environment Variables to Netlify\n\n   - `CLOUDFLARE_ACCOUNT_ID`: Your target Cloudflare Account ID. See more: [Find your zone and account IDs\n     ](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/)\n   - `CLOUDFLARE_API_TOKEN` : Your Cloudflare API Token (with `Pages:Edit` permission) See more: [Create a Cloudflare API token\n     ](https://developers.cloudflare.com/workers/ci-cd/external-cicd/github-actions/#api-token)\n   - `CLOUDFLARE_PAGES_PROJECT_NAME`: Your Cloudflare Pages Project Name\n\n2. Add this plugin to your `netlify.toml`\n\n```toml\n# for all deploy contexts (production, branch deploys, Deploy Previews).\n\n[[plugins]]\n   package = \"netlify-plugin-cloudflare-pages-deploy\"\n   [plugins.inputs]\n      package_exec = \"pnpx\"\n```\n\n```toml\n# for production deploy context. supports [`production`, `deploy-preview`, `branch-deploy`, `dev`]\n\n[[context.production.plugins]]\n\tpackage = \"netlify-plugin-cloudflare-pages-deploy\"\n\t[context.production.plugins.inputs]\n\t\tpackage_exec = \"pnpx\"\n\t\tdeploy_target_branch = \"main\"\n```\n\n### [Recommend]\n\nAdd `wrangler` to your project and use your lover package managers like`npm`, `yarn` or `pnpm` to run `wrangler` command instead `npx` or `pnpx`.\n\nThis will make your build faster cause Netlify always caching dependencies and `wrangler` will be cached too.\n\n#### For `yarn` and `yarn` Workspace\n```sh\n$ yarn add -D wrangler\n```\n\n```toml\n[[plugins]]\n   package = \"netlify-plugin-cloudflare-pages-deploy\"\n   [plugins.inputs]\n      package_exec = \"yarn\"\n```\n\n#### For `pnpm`\n```sh\n$ pnpm add -D wrangler\n```\n\n```toml\n[[plugins]]\n   package = \"netlify-plugin-cloudflare-pages-deploy\"\n   [plugins.inputs]\n      package_exec = \"pnpm exec\"\n```\n\n#### For `bun`\n```sh\n$ bun add -D wrangler\n```\n\n```toml\n[[plugins]]\n   package = \"netlify-plugin-cloudflare-pages-deploy\"\n   [plugins.inputs]\n      package_exec = \"bun\"\n```\n\n\n## For more information about:\n\n- Deploy Context: https://docs.netlify.com/site-deploys/overview/#deploy-contexts\n- Netlify Plugin: https://docs.netlify.com/integrations/build-plugins/\n- Cloudflare Pages Direct Upload: https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/\n- Cloudflare Wrangler Commands: https://developers.cloudflare.com/workers/wrangler/commands/#pages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanxnx%2Fnetlify-plugin-cloudflare-pages-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplanxnx%2Fnetlify-plugin-cloudflare-pages-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanxnx%2Fnetlify-plugin-cloudflare-pages-deploy/lists"}