Full deployments
A full deployment synchronizes the deployable portion of a local directory to a hosted site. It always creates an exact plan before any remote mutation.
Preview a deployment
zynohosting deploy example.com ./dist --dry-runThe plan shows every create, replacement, and deletion plus the number of bytes that must be uploaded. A dry run never applies the plan.
Apply a deployment
Review the displayed plan and confirm interactively:
zynohosting deploy example.com ./distFor reviewed, non-interactive automation:
zynohosting deploy example.com ./dist --yesdeploy-site is an alias for deploy.
How planning works
The CLI and cluster agent:
- negotiate protocol limits, hash algorithms, and mandatory ignores;
- inventory the local and remote deployable trees;
- identify same-size candidates and hash only those files;
- finalize the exact create, replace, and delete operations;
- upload only changed files in the plan;
- revalidate the remote snapshot before applying it;
- invalidate the site cache after a successful apply.
Plans are short-lived and bound to the site, cluster, access token, local manifest, and observed remote state. If either side changes incompatibly, create a new plan.
Ignore rules
Put project-specific patterns in .zynohostingignore at the deployment root:
.env*
coverage/
tests/
*.mapUse a different file or add rules on the command line:
zynohosting deploy example.com ./dist \
--ignore-file ./deploy.ignore \
--ignore '*.map' \
--dry-runPatterns use gitignore-style matching. Mandatory platform exclusions cannot be negated by custom rules. See Mandatory deployment exclusions.
Empty sources
An empty local deployable scope could delete all remote deployable files. The CLI refuses that operation unless it is explicitly approved:
zynohosting deploy example.com ./empty-directory --allow-empty --dry-run
zynohosting deploy example.com ./empty-directory --allow-emptyAlways inspect the dry-run plan before using --allow-empty.
Options
| Option | Purpose |
|---|---|
-y, --yes | Apply without prompting after displaying the plan. |
--dry-run | Display the exact plan without applying it. |
--json | Emit newline-delimited JSON events. |
--allow-empty | Permit an empty local sync scope to delete remote deployable content. |
--ignore <pattern> | Add a gitignore-style exclusion; repeatable. |
--ignore-file <path> | Replace .zynohostingignore with another file. |
--timeout <seconds> | Set inventory, hash, and apply request timeouts; default 600. |
--hash-concurrency <count> | Set concurrent local hash reads; default 8. |
CI example
set -euo pipefail
export ZYNO_HOSTING_API_KEY="$HOSTING_DEPLOY_KEY"
zynohosting --environment production deploy example.com ./dist \
--dry-run \
--json
zynohosting --environment production deploy example.com ./dist \
--yes \
--jsonDeploy JSON is an event stream rather than one final document. See JSON and errors.
Permission
Planning and applying require hosting.deploy.