CI/CD
Any CI that runs Node.js can deploy with the CLI. It needs two things: a credential, and the project to deploy to.
1. Create an API key
In the dashboard, open the workspace's Settings → API keys and create a key with the developer role. Only owners and admins can create keys, and the key's value is shown once: copy it.
Store it in your CI's secrets as HIRAISHIP_TOKEN.
2. Deploy with --project
CI has no terminal to answer prompts, and the .hiraiship link isn't committed. Name the project instead:
The command exits with 1 when the build or its publication fails, which fails the job.
GitHub Actions
There's no install or build step in the job: Hiraiship installs and builds on its own machines.
Other CI systems
The same command works anywhere, as long as HIRAISHIP_TOKEN is set:
Without the CLI
A pipeline that can't run Node.js can make the same requests itself, with the same key: see Deploy without the CLI. The API section covers rollbacks, variables and domains too.
Good practice
- One key per pipeline, so you can revoke one without breaking the others.
- Use
--verboseto keep the full build log in the job's output. - Use
--no-waitwhen the job shouldn't wait for the build, and check the deployment in the dashboard instead. The job then succeeds as soon as the build starts.