skillfed

cloudflare-pages

Cloudflare Pages lets you host frontend projects and full-stack applications with automatic preview deployments, serverless functions, and zero-config CDN delivery. Deploy from Git repositories or the command line using Wrangler, with built-in support for React, Vue, Next.js, Astro, and other frameworks.

Cloudflare Pages deploys static sites and full-stack apps with preview builds, edge functions, and global CDN delivery.

AI-generated summary based on this skill's SKILL.md

44 4 MIT updated by BagelHole

Install

BagelHole/DevOps-Security-Agent-Skills/cloudflare-pages · repository language: Shell

CLI (skillfed)coming soon
git clone https://github.com/BagelHole/DevOps-Security-Agent-Skills
cp -r DevOps-Security-Agent-Skills/infrastructure/cloudflare/cloudflare-pages ~/.claude/skills/cloudflare-pages

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I deploy a React app on Cloudflare Pages?

Cloudflare Pages supports deploying React applications directly from your Git repository or via the Wrangler CLI. Connect your GitHub, GitLab, or Bitbucket repo to Pages, select your build command (e.g., `npm run build`), specify the output directory, and Pages will automatically deploy on every push. Alternatively, use `wrangler pages deploy` to upload your built files from the command line. Pages handles the CDN distribution automatically.

What are Cloudflare Pages preview deployments?

Cloudflare Pages automatically creates preview deployments for every branch and pull request you push to your connected Git repository. Each preview gets its own unique URL, letting you test changes before merging to production. Preview deployments use the same build process and environment as your main site, making it easy to catch issues early without affecting your live application.

Can I build serverless APIs using Pages Functions with edge bindings?

Yes, Cloudflare Pages Functions let you build serverless APIs that run on Cloudflare's edge network. You can create API routes by adding functions to your project, and use edge bindings to connect to services like KV storage, Durable Objects, and D1 databases. Functions execute close to your users with minimal latency, enabling full-stack applications without separate backend infrastructure.

How do I set up Git CI/CD pipelines for Cloudflare Pages deployment?

Cloudflare Pages integrates directly with GitHub, GitLab, and Bitbucket. After connecting your repository, Pages automatically triggers builds and deploys whenever you push commits or open pull requests. You can configure build settings, environment variables, and deployment rules in the Pages dashboard. For advanced workflows, you can also use GitHub Actions or other CI/CD tools with the `wrangler pages deploy` command.

How do I deploy a static site to Cloudflare Pages?

Cloudflare Pages makes deploying static sites simple: connect your Git repository (GitHub, GitLab, or Bitbucket), specify your build command and output directory, and Pages handles the rest. For pre-built sites, use `wrangler pages deploy` to upload your files directly. Pages serves your site globally on Cloudflare's CDN with zero configuration needed.

How do I set up a custom domain on Cloudflare Pages?

Cloudflare Pages lets you add custom domains through the Pages dashboard. Go to your project settings, add your domain, and follow the DNS configuration steps. If your domain is already on Cloudflare, setup is automatic. You can also configure redirects, custom headers, and other routing rules to manage traffic and security for your deployed application.

SKILL.md

rendered from the published skill — quoted content, verbatim

Cloudflare Pages

Deploy frontend projects with preview builds, edge functions, and global CDN delivery on Cloudflare's network.

When to Use

  • Deploying static sites (React, Vue, Astro, Hugo, Next.js static export).
  • Full-stack applications using Pages Functions for server-side logic.
  • Projects that need automatic preview deployments per pull request.
  • Teams that want zero-config CDN with custom domain and TLS.
  • Migrating from Vercel, Netlify, or GitHub Pages to Cloudflare's ecosystem.

Prerequisites

  • Node.js 18+ and npm installed locally.
  • A Cloudflare account (free tier works for most projects).
  • Wrangler CLI installed: npm install -g wrangler.
  • Authenticated via wrangler login or CLOUDFLARE_API_TOKEN environment variable.
  • Source code in a Git repository (GitHub or GitLab for dashboard integration).

Project Setup via Wrangler

Create a New Project

```bash

Create a new Pages project

npx wrangler pages project create my-site

List

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
infrastructure/cloudflare/cloudflare-pages/SKILL.md

Related skills

Tags

edge-deployment serverless-functions git-integrated-hosting preview-environments static-site-generator full-stack-capable cdn-global-network infrastructure-as-code