Skip to content

Deployments

Commands that create, inspect, and manage deployments. For the workflow, see Deploy from your machine.

The lifecycle verbs (promote, rollback, redeploy, cancel) are available both as top-level commands and under yofix deployments <verb>; they are identical.

yofix deploy

Deploy the current directory. Uploads the source, so no git push is needed. Defaults to a preview; --prod ships to production. Blocks until the build finishes unless --no-wait is set.

Terminal window
yofix deploy
yofix deploy --prod
yofix deploy --no-wait --timeout 900
FlagDefaultDescription
--prodpreviewDeploy to production
-m, --message <message>commit messageDeploy message to record
--branch <branch>current git branchBranch label to record
--no-waitwaitsReturn as soon as the build is queued
--timeout <seconds>600Give up waiting after this many seconds

yofix ls

List recent deployments. Alias of yofix deployments list.

Terminal window
yofix ls
yofix ls --prod --limit 10
yofix ls --status ready --branch main
FlagDefaultDescription
--status <status>allFilter by deployment status
--branch <branch>allFilter by git branch
--commit <sha>allFilter by git commit SHA
--target <target>allFilter by target (preview, production)
--prodoffShorthand for --target=production
--limit <n>20Maximum rows to return

yofix deployments get

Show full detail for a single deployment.

Terminal window
yofix deployments get <deploymentId>

yofix inspect

Show deployment detail, optionally waiting for it to finish and printing logs.

Terminal window
yofix inspect <deploymentId>
yofix inspect dpl_4f2a9c --wait --logs
FlagDefaultDescription
--waitoffBlock until the deployment reaches a terminal state
--logsoffAlso print build logs after the detail
--timeout <seconds>600Give up waiting after this many seconds
--interval <seconds>5Poll interval when waiting

yofix logs

Show or follow deployment logs. The deployment ID defaults to the most recent.

Terminal window
yofix logs
yofix logs dpl_4f2a9c --follow
yofix logs --source build --since 15m --level error
FlagDefaultDescription
-f, --followoffStream logs over WebSocket until the build ends or Ctrl-C
--source <source>allFilter by source (build, vrt, runtime)
--since <duration>allOnly show logs newer than this (e.g. 1h, 15m)
--level <level>allMinimum log level (info, warn, error)
--limit <n>500Max lines for non-follow mode

yofix watch

Block until the matching deployment reaches a terminal state.

Terminal window
yofix watch
yofix watch --branch main --timeout 900 --interval 10
yofix watch --commit $GITHUB_SHA --prod
FlagDefaultDescription
--branch <branch>current git branchBranch to watch
--commit <sha>latest on the branchWatch the deployment for this exact commit
--target <target>anyOnly watch deployments for this target (preview, production)
--prodoffShorthand for --target=production
--timeout <seconds>600Give up after this many seconds
--interval <seconds>5Poll interval

Gate a production promotion on --prod. One push can produce several deployments for the same commit, typically a production build plus a preview row that is immediately skipped (a [skip ci] commit, for instance). A skipped deployment counts as finished, so watching without a target can match the skipped preview and report success while production is still building.

In CI, prefer --commit. Watching a branch follows whatever built most recently on it, so a second push landing mid-workflow will silently redirect the watch to the newer build. --commit pins the deployment for the exact SHA the workflow checked out, and works on a detached HEAD where there is no branch to infer.

yofix promote

Promote a deployment to production. This rebuilds the same commit with production environment variables. See Promote and rollback.

Terminal window
yofix promote <deploymentId>
yofix deployments promote <deploymentId>

yofix rollback

Roll production back to a previous deployment. This is an instant alias swap, not a rebuild.

Terminal window
yofix rollback <deploymentId>
yofix deployments rollback <deploymentId>

yofix redeploy

Rebuild a finished deployment from the same commit: ready, failed, cancelled, skipped, or expired. An expired deployment’s files were removed after its retention period; redeploying builds fresh files. The rebuild keeps the source deployment’s target: a preview rebuild takes its branch URL again, and a production rebuild that a newer build has replaced gets its own URL until --live or yofix rollback makes it live. Deployments uploaded with yofix deploy cannot be redeployed; run yofix deploy again instead.

Terminal window
yofix redeploy <deploymentId>
yofix deployments redeploy <deploymentId>
yofix redeploy dpl_4f2a9c --cache
yofix redeploy dpl_4f2a9c --live
FlagDefaultDescription
--cachefresh buildReuse the build cache
--liveserver decidesMake the rebuild the live deployment for its target when it is ready. Without it, a rebuild of a production build that a newer one replaced only gets its own URL (use yofix rollback to make it live); rebuilding the live build replaces it

yofix cancel

Cancel an in-progress deployment.

Terminal window
yofix cancel <deploymentId>
yofix deployments cancel <deploymentId>