HubDocs

CLI reference

hub deploy

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

Deploy the folder, or connect a GitHub repository and deploy it on every push. Prints the URL when the app is live.

Hub reads the folder: its own compose file, a Dockerfile, a Node app with a start script, a front end with a build script, or a folder with an index.html. Only your org can open a new app until you change its access.

In a git folder whose remote is on GitHub, hub deploy deploys what you pushed and redeploys on every push. With changes GitHub does not have yet, it asks what to deploy, or takes --pushed or --local.

Usage

hub deploy [options] [dir]

Arguments

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

Options

OptionDescription
--name <app>App name, instead of guessing it from the folder.
--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).
--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.
--localAlways upload this folder as it is now, skipping GitHub entirely.

Examples

# Deploy the folder you are in
hub deploy

# Deploy another folder
hub deploy ./my-app

# Deploy a GitHub repository, and again on every push
hub deploy --git owner/repository

# Deploy to the staging instance
hub deploy --instance staging

On this page