Skip to content

[Feature]: Cloudflare Workers deploy provider (Workers Static Assets), alongside Vercel and Pages #8411

Description

@zenprocess

What problem are you trying to solve?

OpenDesign can deploy to Vercel and to Cloudflare Pages. The Cloudflare Pages provider uploads a static asset manifest only, so anything that needs code on the edge (an API route, a form handler, a Durable Object, environment bindings) cannot be deployed from OpenDesign to Cloudflare.

Cloudflare is also steering new projects to Workers with Static Assets rather than Pages. Today a user whose site is a Worker has to leave OpenDesign and run wrangler deploy by hand, and loses the deploy button, the deployment history and the link check.

Describe the solution you'd like

A third deploy provider, cloudflare-workers, that behaves exactly like the existing vercel-self and cloudflare-pages providers:

  • Settings: the same settings pattern (API token + account ID, masked token, configured flag) through /api/deploy/config?providerId=cloudflare-workers.
  • Deploy: the same deploy button, preflight, deployments list and check-link routes, and the same od deploy CLI path.
  • Upload: the project's files go up as Workers Static Assets: an upload session with the manifest, only the missing buckets uploaded, then a completion token.
  • Worker script: a Worker with an assets binding. By default it is a minimal assets-only Worker; if the project ships its own worker.js/_worker.js, that is used instead.
  • URL: published on <name>.<subdomain>.workers.dev, with an optional custom domain on a zone the token can edit, mirroring the Pages zones picker.
  • Preview vs production: preview deployments use Worker versions / preview URLs, so a preview does not replace production (the same concern as [Bug]: Cloudflare Pages deploys are always production — target: 'preview' is ignored, no way to publish a gated preview #4483 and Expose deploy target (preview/production) in the web UI and od deploy CLI #4577 for Pages).

No new runtime dependency is needed; this is all Cloudflare REST API calls, like the Pages provider.

Alternatives you've considered

  • Pages Functions: the Pages provider would need _worker.js/Functions bundling. Cloudflare's own guidance points new work to Workers, and Pages cannot host Durable Objects.
  • Shelling out to wrangler: this adds a heavy dependency and a Node toolchain requirement to the daemon image, and it is harder to test.
  • A deploy plugin outside core: the deploy UI, settings and history are core today, so a plugin could not offer the same experience.

Additional context

Would you be willing to contribute a PR?

Yes, I can take this on

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or enhancementneeds-product-directionAwaiting product direction review (see OpenDesign roadmap)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions