From 50c582dc9a26d7d2d375302524854a7bb6345343 Mon Sep 17 00:00:00 2001 From: Nathan Totten Date: Sun, 5 Jul 2026 15:46:42 -0400 Subject: [PATCH] Clarify CI/CD deploy environment selection in zuplo-cli skill Explain that `zuplo deploy` selects the environment from the current git branch (default branch maps to production), so `--environment` should be left unset in normal CI/CD. Document when to set it explicitly (no git repo, or deliberate named-environment/tag deploys) and note the default branch is configurable in the portal. Co-Authored-By: Claude Opus 4.8 --- skills/zuplo-cli/SKILL.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/skills/zuplo-cli/SKILL.md b/skills/zuplo-cli/SKILL.md index ef571fe..794b412 100644 --- a/skills/zuplo-cli/SKILL.md +++ b/skills/zuplo-cli/SKILL.md @@ -176,14 +176,16 @@ zuplo project create --name my-proj --account my-acct #### `zuplo deploy` -Deploy the current directory. Uses the current git branch name as the environment name by default. +Deploy the current directory. Uses the current git branch to select the environment by default — the default branch (typically `main`) maps to the production environment. In CI/CD, leave `--environment` unset so the branch being built selects the environment automatically. Only pass `--environment` when there is no git branch to detect (e.g. not in a git repo) or when you deliberately want to deploy to a specific named environment (e.g. deploying a tag to `staging`). ```bash -zuplo deploy # Uses git branch as environment name -zuplo deploy --environment my-env # Override environment name -zuplo deploy --account my-acct --project my-proj # Explicit account/project +zuplo deploy # Uses git branch to select the environment +zuplo deploy --account my-acct --project my-proj # Explicit account/project (branch selects environment) +zuplo deploy --environment staging # Explicitly target a named environment ``` +The default branch that maps to the production environment can be changed in the Zuplo portal. + **Polling timeout:** Default polls every 1s for 150s. Override with environment variables: ```bash @@ -424,9 +426,23 @@ npx zuplo dev ### Deploy from CI/CD +Set `ZUPLO_API_KEY` and run `zuplo deploy`. **Do NOT pass `--environment` in normal CI/CD** — the CLI reads the current git branch and maps it to the matching Zuplo environment automatically (the default branch, typically `main`, maps to the production environment). Since CI checks out the branch being built, the correct environment is selected for you. + +```bash +export ZUPLO_API_KEY=zpka_xxxxx +npx zuplo deploy --account my-account --project my-project +``` + +The default branch (the one that deploys to the production environment) can be changed in the Zuplo portal. + +Only pass `--environment` when the branch-based mapping doesn't apply, for example: + +- The build isn't running inside a git repo (no branch to detect). +- You deploy from tags instead of branches and want to target a specific named environment — e.g. deploy a tag to `staging` first, then promote to `production`: + ```bash export ZUPLO_API_KEY=zpka_xxxxx -npx zuplo deploy --environment production +npx zuplo deploy --account my-account --project my-project --environment staging ``` ### Connect local dev to remote services