Deploy to Cloudflare Pages

This guide covers deploying static sites with the OpenDeploy CLI to Cloudflare Pages.

No capability data.

Prerequisites

  • Cloudflare account and a target project
  • CLOUDFLARE_API_TOKEN set in your environment (CI recommended)

Quick start

bash
# Dry‑run plan
opd plan cloudflare --json --path .

# Deploy
opd deploy cloudflare --path .

Notes

  • Use --env production for production builds, otherwise previews.
  • Ensure your project outputs a static artifact directory.

Astro example (static)

bash
# Configure output to static
opd config cloudflare --write --path .

# Deploy
opd deploy cloudflare --path .

If your site builds to a custom directory, pass --publish-dir in your config or ensure detection reports it.

Troubleshooting

  • Project creation: the plugin can auto-create a project; verify the inferred name in logs.
  • 404 on assets: confirm the publish directory matches the built output.