HubDocs

CLI reference

hub deploy

Deploy a folder, or a GitHub repository with --git.

View Markdown

Deploy the folder or a GitHub repository. Public repositories need no GitHub grant; use --watch for push-to-deploy. Prints the URL when the app is live.

Deploy the current local files by default, including uncommitted changes. Use --git for a GitHub repository. The app name defaults to hub.yaml, the folder, or the repository. Hub detects the project, waits for the release, and prints its URL. New apps are accessible to your organization.

Use --pushed to deploy the last pushed commit from a GitHub checkout. Public repositories clone anonymously. Private repositories require a GitHub grant. New GitHub repositories deploy once; redeploying the same repository keeps its auto-deploy setting. Use --watch or --no-watch to change it (watching requires a GitHub grant).

Existing uploads require confirmation because Hub cannot verify folder identity. Changing GitHub repository, branch or path also requires confirmation. Use --force for scripts after checking the target; JSON and MCP never prompt. Managed Workspace cannot be replaced by a plain deploy, even with --force. Choose another name.

Usage

CLI
hub deploy [options] [dir]

Arguments

ArgumentDescription
[dir]App folder. Optional. Default: ..

Options

OptionDescription
--name <app>Override the app name from hub.yaml, the folder, or the repository.
--forceConfirm replacing an existing upload or changing GitHub source; cannot replace managed Workspace.
--instance <name>Instance to deploy to, default prod.
--publicLet anyone open it, with no login.
--logsPrint the full build log instead of the compact summary.
--detachReturn once the upload finishes, without following the release.
--git <repo>Connect and deploy a GitHub repository (owner/name or a URL), with no local checkout.
--branch <name>Branch to deploy, with --git (default the repository default).
--path <path>Subfolder to deploy, with --git (default the repository root).
--watchWith --git or --pushed, redeploy on every push (requires a GitHub grant).
--no-watchWith --git, do not redeploy on every push.
--pushedDeploy the last pushed commit whatever the folder holds; fails when nothing here is on GitHub. Not with --local.
--localUpload the current local files (default).
--jsonReturn a structured release immediately, without waiting for the build.

Examples

CLI
# Deploy the files in this folder
hub deploy

# Deploy a GitHub repository once
hub deploy --git owner/repository

# Deploy local files to staging
hub deploy --instance staging

On this page