cf-pages-deploy
/cf-pages-deploy
Deploy a static site or single HTML file to Cloudflare Pages safely and verify it is live. Stages a clean copy (no .env, node_modules, README, keys), scans for secrets, creates the project if asked, deploys to production or a preview branch, then checks the live file matches byte for byte. Use for any "deploy/redeploy this to Cloudflare Pages / pages.dev" request.
- Author
- binay-py ↗
- Repository
- claude-skills ↗
- Licence
- MIT
- Last repository change
- 09.11.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 09.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/deploy.mjs
What it does and when to use it
Deploy a static site or single HTML file to Cloudflare Pages safely and verify it is live. Stages a clean copy (no .env, node_modules, README, keys), scans for secrets, creates the project if asked, deploys to production or a preview branch, then checks the live file matches byte for byte. Use for any "deploy/redeploy this to Cloudflare Pages / pages.dev" request.
Triggers from the description
Original author description
Deploy a static site or single HTML file to Cloudflare Pages safely and verify it is live. Stages a clean copy (no .env, node_modules, README, keys), scans for secrets, creates the project if asked, deploys to production or a preview branch, then checks the live file matches byte for byte. Use for any "deploy/redeploy this to Cloudflare Pages / pages.dev" request.
How it works
- Rules
- Gotchas this script handles
SKILL.md preview
---
name: cf-pages-deploy
description: Deploy a static site or single HTML file to Cloudflare Pages safely and verify it is live. Stages a clean copy (no .env, node_modules, README, keys), scans for secrets, creates the project if asked, deploys to production or a preview branch, then checks the live file matches byte for byte. Use for any "deploy/redeploy this to Cloudflare Pages / pages.dev" request.
---
# cf-pages-deploy
`scripts/deploy.mjs` is zero-dependency Node 22+ and calls `npx wrangler`. Run `npx wrangler whoami` first; if it says you're not logged in, ask the user to run `npx wrangler login`.
```
node deploy.mjs --project my-site --dir ./public --dry-run # ALWAYS first: shows exactly what goes live
node deploy.mjs --project my-site --dir ./public # production (branch main), verified
node deploy.mjs --project my-site --dir . --include "index.html,*.css,*.js,assets/**"
node deploy.mjs --project my-site --dir dist --build "npm run build"
node deploy.mjs --project new-site --dir dist --create # make the project if missing
node deploy.mjs --project my-site --dir dist --branch preview # preview URL; production untouched
```
## Rules
- Run `--dry-run` and read the file list before the first deploy of any folder. Everything uploaded is public.
- Prefer `--include` for project folders that mix site and source files. A single-file site is `--include index.html`.
- Excluded by default: `.git`, `node_modules`, `.env*`, keys/certs, `*.md`, `package*.json`, lockfiles, `wrangler.*`, OS junk, logs and databases.
- A secret found in a file that would go public stops the deploy. Never pass `--allow-secrets` unless the user confirms the value is meant to be public (e.g. a browser-restricted Maps key).
- `--create` only when the user wants a NEW project. Look up existing names first with `npx wrangler pages project list`.
- Production deploys replace the live site. Confirm with the user unless they asked for a deploy/redeploy.
## Gotchas this script handles
- **Real URL ≠ project name.** Pages may add a suffix (`my-game-28c.pages.dev`). The script reads the domain from `wrangler pages project list --json`; report that URL, not a guessed one.
- **wrangler 4.15x+ `pages project create`** delegates to "Pages in Workers" and can fail ("Could not detect a directory containing static files") or create a Worker instead. The script passes the hidden `--force` flag to create a classic Pages project. Only creation needs it.
- `--branch main` = production. Any other branch = preview deployment at `https://<hash>.<project>.pages.dev`.
- Unknown paths return HTTP 200 with `index.html` (SPA fallback), so a 200 on `/.env` doesn't mean it leaked. Check the body.
- Limits: 25 MiB per file, 20,000 files per deployment.
- Redirects/headers: put `_redirects` / `_headers` files in the site root. They're deployed as-is.
- Verification retries for ~60 s. If it still fails, the edge may be slow. Report the deployment URL and re-check; don't redeploy blindly.
Files in this package (4)
- SKILL.md 3 KB
- scripts/deploy.mjs 11 KB
- scripts/.wrangler/cache/pages.json 1 KB
- scripts/.wrangler/cache/wrangler-account.json 1 KB
Versions
The database has no other skills named cf-pages-deploy.
Database snapshot: 13.11.2026 · package version c3dbfa07bf1f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100cf-page
Deploys a static site (a single HTML file or a folder) to Cloudflare Pages — both a one-command local wrangler deploy and a GitHub Actions CI/CD pipeline — wiring up .env/.env.example and encrypted repo secrets. Use when the user wants to publish or deploy a static site or HTML… - 100cloudflare-pages
Deploy static sites to Cloudflare Pages with custom domains and CI/CD. Use when the user wants to deploy a site to Cloudflare Pages, add a custom domain to a Pages project, set up GitHub Actions CI/CD for Cloudflare Pages, roll back a deployment, or verify deployment status.… - 100cloudflare-pages-deploy
Deploy static sites, previews, and multi-site review hubs to Cloudflare Pages (free hosting) with wrangler, then verify them on the public URL. Covers hello-world pages, preview builds, per-branch preview URLs, redeploys of existing *.pages.dev projects, and checking what is… - 95Cloudflare
Deploy Cloudflare Workers/Pages. USE WHEN Cloudflare, worker, deploy, Pages, MCP server. SkillSearch('cloudflare') for docs. - 100cloudflare-deploy
Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare. - 95cloudflare-deploy
Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.