# Deploy workers

Part of **Cloudflare**. Route queries via `POST https://www.company-skill.com/api/route`.

## What You Want to Do

You want to host a pre-built static website (HTML, CSS, JS, images) using Cloudflare Workers, leveraging Cloudflare’s global network for fast delivery. This typically involves frameworks like React, Vue, Hugo, Gatsby, Jekyll, or Eleventy that output a build directory.

**Typical User Questions**:
- How to deploy a static site with Cloudflare Workers?
- How to handle static assets with Cloudflare Workers?

## Decision Tree

Pick the best path for your situation:

- **If** you need to integrate deployment into a CI/CD pipeline or script → Use CLI (go to *cloudflare/cloudflare-static*)
- **If** you are manually deploying a simple static site and prefer command-line control over full GUI → Use Workers Sites (go to *cloudflare/cloudflare-static*)
- **Otherwise (default)** → Use CLI , as both paths require the Wrangler CLI and neither offers true graphical deployment; CLI is more automation-friendly and aligns with Cloudflare’s actual workflow.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| Workers Sites | Cloudflare | low | No | No | Deployment must use Wrangler CLI; Cloudflare dashboard only provides monitoring and logs | `cloudflare/guide/cloudflare-static` |
| CLI | medium | No | Yes | Enables scripted deployments via `npx wrangler deploy` in CI/CD workflows | `cloudflare/cli/cloudflare-static` |

## Path Details

### Path 1: Workers Sites 

**Best For**: Cloudflare 

**Brief Description**: Workers Sites uses the Wrangler CLI and KV-Asset Handler to deploy static assets to Cloudflare Workers. It leverages `getAssetFromKV` to serve files from a Workers KV namespace configured via `site.bucket` in `wrangler.toml`, with routing handled through standard Worker `route` definitions.

**Key technical facts**:
- Billing: Free tier available for Workers Sites with limited bandwidth and requests per month. Billing is based on request volume and data transfer beyond free limits.
- Runtimes: React, Vue, Hugo, Gatsby, Jekyll, Eleventy

**When to Use**:
- Cloudflare HugoGatsbyJekyll
- public _site Wrangler 

**When NOT to Use**:
- CI/CD CLI 

### Path 2: CLI 

**Brief Description**: This approach uses the Wrangler CLI to deploy static sites via Workers Sites, relying on the KV-Asset Handler and `getAssetFromKV` to serve assets stored in a KV namespace defined by `site.bucket`. The deployment is triggered via `npx wrangler deploy`, making it ideal for automation.

**Key technical facts**:
- Billing: Free tier available for Workers Sites with limited bandwidth and requests per month. Billing is based on request volume and data transfer beyond free limits.
- Runtimes: React, Vue, Hugo, Gatsby, Jekyll, Eleventy

- Wrangler Workers KV

**When NOT to Use**:
- Node.js Wrangler CLI

## FAQ

Q: Which path should I start with?
A: Start with CLI unless you’re certain you’ll never automate deployments. Both require the Wrangler CLI, but the CLI path is more flexible and future-proof.

Q: What if I expect to deploy via Cloudflare dashboard GUI but chose Workers Sites ?
A: You’ll hit a limitation: deployment must be done via `npx wrangler deploy`—the dashboard only shows logs and metrics, not deployment controls.

Q: What if I need CI/CD automation but chose Workers Sites ?
A: You’ll struggle to integrate deployment into scripts, as this path isn’t designed for automation and lacks clear CLI-driven workflows despite using Wrangler.

Q: Do I need to write code like `src/index.ts` or use `@cloudflare/kv-asset-handler`?
A: Yes—both paths rely on a Worker script (typically `src/index.ts`) that imports `@cloudflare/kv-asset-handler` and calls `getAssetFromKV` to serve files from the `site.bucket`.

Q: Can I deploy without installing Node.js or Wrangler?
A: No—both paths require Node.js and the Wrangler CLI. There is no pure GUI or API-only deployment option for Workers Sites.

Q: Are custom domains supported?
A: Yes, but your domain must already be added as a Cloudflare zone, and DNS records must be managed separately in the DNS section—not during deployment.

Q: Is there a difference in billing between the two paths?
A: No—both use the same Workers Sites billing model: free tier with usage-based charges for requests and bandwidth beyond limits.

## Related queries

deploy static site with workers, deploy static site cloudflare, how to deploy static site with workers, workers sites deploy, deploy html css js to cloudflare, deploy static assets with worker, deploy static website cloudflare, cloudflare workers static hosting, serve static files workers, deploy hu

---
Part of [Cloudflare](https://www.company-skill.com/p/cloudflare.md) · https://www.company-skill.com/llms.txt
