update
update deployments
♻️ Update a deployment's git source and build settings.
Repoint a deployment at another repository or branch, or change how it builds. Each flag is named after its manifest field, and only the flags you pass are sent: everything else keeps its saved value.
--git-url repository to build from --branch branch to build and to deploy on push --git-connection-id git connection that can clone the repository --root-directory the app's directory inside the repository --install-command dependency install command (static sites) --build-command build command --publish-directory directory the build outputs and publishes (static sites)
The deployment keeps serving its current build. The next push or
csph deployment builds create <id> builds from the new source, and the new
build replaces the live one only if it succeeds.
Pass the whole PATCH body instead with --file (JSON or YAML) or on stdin; it takes precedence over the flags. Run with only an id on a terminal, or with -i, to be prompted for the values.
This command supports reading input from a file.
Files can be supplied via the --file flag or piped into the command.
Example of file structure
{}
Usage
csph deployments update <deployment-id> [flags]
Aliases
deployments update, deployments edit, deployment update, deployment edit, deploys update, deploys edit
Options
Command Specific
Formatting
For more information about formatting options, see Formatting.
Available Fields
env_id, environment, id, last_deployed_at, name, object, service_id, service_name, service_type, sphere_count, status, type
Inherited
Examples
# point a static site at a different repository and branch
> csph deployment update <deployment-id> --git-url github.com/acme/site --branch main
# change how it builds
> csph deployment update <deployment-id> --install-command "npm ci" --build-command "npm run build" --publish-directory dist
# a monorepo app
> csph deployment update <deployment-id> --root-directory apps/web
# from a payload file, or from stdin
> csph deployment update <deployment-id> --file source.yaml
> echo '{"build_config":{"branch":"release"}}' | csph deployment update <deployment-id>
# be prompted for the values
> csph deployment update <deployment-id>
> csph deployment update
See also
- csph deployments — manage deployments
- csph deployments get — get deployments
- csph deployments logs — view deployment logs (runtime, build, or deploy)
- csph deployments list — list deployments
- csph deployments delete — delete deployments
- csph deployments start — start a deployment
- csph deployments stop — stop a deployment
- csph deployments restart — restart a deployment
- csph deployments redeploy — redeploy a deployment
- csph deployments promote — deploy an image built for another environment, without rebuilding
- csph deployments rollback — roll a deployment back to a previous version
- csph deployments scale — scale a deployment to a target spherelet count
- csph deployments port — update the port of a deployment
- csph deployments domains — manage a deployment's custom domains
- csph deployments builds — manage a deployment's builds
- csph deployments runs — start and manage runs
- csph deployments default-url — turn the deployment's default URL off or on