Skip to content

hiraiship deploy

Uploads a directory, builds it, and publishes it to the linked project's production environment.

Terminal
hiraiship deploy [dir] [options]

dir defaults to the current directory.

What it does

  1. Links the directory if it isn't yet: asks which project to deploy to, or creates one. See link.
  2. Packs the directory, leaving out ignored files. See Ignoring files. The upload is limited to 25 MB; above that, the CLI lists the largest files so you can ignore them.
  3. Starts the deployment, recording the current Git commit and its message when the directory is a Git repository.
  4. Follows the build step by step, then prints the URL. See Build logs.

Options

OptionDescription
--project <slug>Deploy to this project, and link the directory to it. Required when there's no terminal to prompt in, like in CI.
--no-waitReturn once the build is started or queued, without following it.
--verbosePrint every log line, not just the steps.
--install-command <command>Install command for this deployment.
--build-command <command>Build command for this deployment.
--output-dir <dir>Output directory for this deployment.
--machine <machine>Build machine for this deployment: standard-1 to standard-4. Also read from HIRAISHIP_MACHINE.

The build options apply to this deployment only, on top of the project's build settings. The global options apply too.

Examples

Deploy the current directory:

Terminal
hiraiship deploy

Deploy a folder you built yourself, as a static site:

Terminal
hiraiship deploy ./dist

Deploy from CI, to a known project, on a bigger machine:

Terminal
HIRAISHIP_TOKEN=hsk_… hiraiship deploy --project my-app --machine standard-2

Output

On success, the last lines are the URL and a link to the deployment in the dashboard:

Output
✔ Deployed → https://my-app.hiraiship.app
  Inspect: https://app.hiraiship.com/my-team/my-app/3f6c…

On failure, the CLI prints the last 20 lines of the step that failed, and exits with code 1.

Errors

MessageMeaning
Deployment refused: …A plan limit. The message names it. See Limits.
Your role in … can't deployYou're a viewer in this workspace.
The linked project (…) no longer existsThe link points at a project you can't reach any more. Run hiraiship link --project <slug>.
This directory is not linked to a projectThere's no terminal to prompt in. Pass --project <slug>.
Build machine … refusedYour plan doesn't allow that machine. The message lists those it does.