ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop using the Portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingMCP - Quick start
    Develop Locally
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth
Concepts
Development
Policies
Handlers
API Keys
MCP Server
MCP Gateway
AI Gateway
Developer Portal
Monetization
Deploying & Source Control
    Overview
    GitHub
    GitLab
    Bitbucket
    Azure DevOps
    CircleCI
      Basic DeploymentDeploy and TestPR Preview EnvironmentsLocal Testing in CITag-Based ReleasesMulti-Stage Deployment
    Custom CI/CDMonorepo DeploymentRename/Move Project
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
Migration Guides
Platform LimitsSecuritySupportTrust & ComplianceChangelog
powered by Zudoku
CircleCI

CircleCI: Multi-Stage Deployment

Deploy to staging, test, then promote to production with approval.

.circleci/config.yml
version: 2.1 jobs: deploy-staging: docker: - image: cimg/node:20.0 steps: - checkout - run: npm install - run: name: Deploy to Staging command: | set -o pipefail npx zuplo deploy --api-key "$ZUPLO_API_KEY" --environment staging 2>&1 | tee ./DEPLOYMENT_STDOUT STAGING_URL=$(grep -oP 'Deployed to \K(https://[^ ]+)' ./DEPLOYMENT_STDOUT) echo "export STAGING_URL=$STAGING_URL" >> "$BASH_ENV" echo "$STAGING_URL" > staging_url.txt - persist_to_workspace: root: . paths: - staging_url.txt test-staging: docker: - image: cimg/node:20.0 steps: - checkout - attach_workspace: at: . - run: npm install - run: name: Run Tests command: | STAGING_URL=$(cat staging_url.txt) npx zuplo test --endpoint "$STAGING_URL" deploy-production: docker: - image: cimg/node:20.0 steps: - checkout - run: npm install - run: npx zuplo deploy --api-key "$ZUPLO_API_KEY" --environment production workflows: staging-to-production: jobs: - deploy-staging: filters: branches: only: main - test-staging: requires: - deploy-staging - hold-for-approval: type: approval requires: - test-staging - deploy-production: requires: - hold-for-approval

Setting Up Approval

The type: approval job pauses the workflow until someone approves it in the CircleCI UI.

For more control:

  1. Go to Project Settings > Advanced
  2. Enable Only build pull requests for protected branches
  3. Use CircleCI contexts to restrict who can approve production deployments
Edit this page
Last modified on December 3, 2025
Tag-Based ReleasesCustom CI/CD
On this page
  • Setting Up Approval
YAML