hiraiship deploy
Uploads a directory, builds it, and publishes it to the linked project's production environment.
dir defaults to the current directory.
What it does
- Links the directory if it isn't yet: asks which project to deploy to, or creates one. See link.
- 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.
- Starts the deployment, recording the current Git commit and its message when the directory is a Git repository.
- Follows the build step by step, then prints the URL. See Build logs.
Options
| Option | Description |
|---|---|
--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-wait | Return once the build is started or queued, without following it. |
--verbose | Print 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:
Deploy a folder you built yourself, as a static site:
Deploy from CI, to a known project, on a bigger machine:
Output
On success, the last lines are the URL and a link to the deployment in the dashboard:
On failure, the CLI prints the last 20 lines of the step that failed, and exits with code 1.
Errors
| Message | Meaning |
|---|---|
Deployment refused: … | A plan limit. The message names it. See Limits. |
Your role in … can't deploy | You're a viewer in this workspace. |
The linked project (…) no longer exists | The link points at a project you can't reach any more. Run hiraiship link --project <slug>. |
This directory is not linked to a project | There's no terminal to prompt in. Pass --project <slug>. |
Build machine … refused | Your plan doesn't allow that machine. The message lists those it does. |