orbitpush deploy
Upload the build output, apply the settings from orbitpush.json and purge the cache.
npx orbitpush deploy [--prune-hostnames]
Deploys the output directory from orbitpush.json. Build your site first: the output directory must exist.
› Deploying dist to https://www.example.com
Project my-site (DE)
Aliases example.com
bunny.net https://dash.bunny.net/cdn/654321
› Files: 3 uploaded, 2 kept, 120 unchanged
› Edge rules: 1 added, 1 removed, 4 kept
✔ Deployed to https://www.example.com in 4.1s
What it does
- Reads
orbitpush.jsonandBUNNY_API_KEY. - Uploads only the files whose SHA256 checksum changed, HTML files last.
- Applies SPA mode or the 404 page, and the replication regions, delivery regions and domains from
orbitpush.json. - Turns
redirects,headers, aliases and the trailing-slash setting into edge rules. - Deletes files that left the build, but keeps the scripts and styles a page still open on the previous version may load. See Version skew.
- Purges the pull zone cache.
How it works explains each step in detail.
Options
| Option | Description |
|---|---|
--prune-hostnames |
Remove every hostname from the pull zone that orbitpush.json does not list, with its certificate, except <name>.b-cdn.net. This includes hostnames added in the dashboard. |
The first deploy
In a terminal, deploy without an orbitpush.json asks whether to set up a new site, asks the init questions, and deploys right after.
Without a terminal it stops with an error instead, so CI never creates a site.
Warnings
deploy warns, and keeps going, when:
- the output directory has no
index.html - a redirect or headers entry is not supported and is skipped
- the output directory contains
_redirectsor_headers, which are not read or uploaded - a symlink is broken or points to a directory, which is skipped
- a file is under
.orbitpush/, which belongs to orbitpush and is skipped - the pull zone has a hostname that
orbitpush.jsondoes not list - the site is disabled: the deploy goes through, but the block stays in place
A hostname that orbitpush.json no longer lists, such as a removed alias or a former domain, keeps serving the site without a redirect. Remove one with orbitpush domains remove <host>, or all of them with --prune-hostnames. A former primary domain usually belongs in aliases instead, so that its links redirect to the new one: orbitpush domains add <host>.
Timing
bunny.net applies edge rule changes one by one, a few seconds after deploy finishes (2–6 s in our tests).