Deploy
Summary
Deploy workers to Cloudflare via managed hosting
Usage
omnibase cloud workers deployDescription
Build, package, and upload one or more Workers deployments for the selected cloud branch.
End-to-end flow:
- Resolve the target environment (
--envor interactive picker). - Load the resolved secrets for that branch (see env resolution below).
- Run
bunx wrangler deploy --dry-run --outdir .bundlein the deployment directory with the resolved env exported. If the wrangler config declares abuild.command, wrangler runs it first, so the app is built as part of the deploy; the result is a production bundle. - Package the bundle plus any
[assets]into a self-contained zip, with the deployment'swrangler.json[vars]interpolated at package time. - Upload the bundle to managed hosting, which runs
wrangler deploy --dispatch-namespaceand returns the live URL.
By default a single-deployment project deploys it directly; with multiple deployments you are prompted to select one. --name picks a specific deployment by name and --all deploys every deployment.
Before: the branch must be provisioned (has a branch ID) and a profile must be configured (omnibase cloud login). Deployments must exist in omnibase.toml or omnibase/workers/. Cloud environments are required — deploying to local is not supported.
Environment variables: {VAR} references in the wrangler [vars] resolve from the branch env file. See the env resolution model on the cloud env page.
Caveats: values in [vars] are visible in the deployed worker — put secrets in wrangler secret or the managed-hosting secrets API, not in [vars]. Unresolved {VAR} values are left literal and the CLI warns.
omnibase cloud workers deploy --env dev
omnibase cloud workers deploy --env staging --name api
omnibase cloud workers deploy --env production --allOptions
--name <name>Deploy a specific deployment by name--allDeploy all deployments