Custom CI/CD
GitHub Actions: Basic Deployment
The simplest workflow deploys your API to Zuplo on every push to main.
.github/workflows/deploy.yaml
This workflow:
- Triggers on pushes to the
mainbranch - Checks out your code
- Installs dependencies (including the Zuplo CLI)
- Deploys to Zuplo using the branch name as the environment name
Since this deploys from main, it updates your production environment.
Passing --environment is technically optional here — without it, the CLI
infers the environment name from the checked-out git ref — but inference can
pick the wrong name in CI (detached HEAD checkouts, commits that exist on more
than one branch, or pull_request merge refs). Passing the branch name
explicitly makes every workflow deploy a predictable environment. See the
deploy command reference for details.
Next Steps
- Add testing after deployment
- Set up PR preview environments
- Implement tag-based releases for more control
Last modified on