# Bitbucket Pipelines: Basic Deployment

> **Scope of this page**
>
> This page documents the Zuplo **gateway** runtime (API, AI, and MCP gateways), not the Developer Portal.
>
> It applies to every Zuplo hosting option: Managed Edge, Managed Dedicated, and Self-Hosted. See [Hosting options](https://zuplo.com/docs/articles/hosting-options).
>
> On Self-Hosted, this works differently: Add `--self-hosted-endpoint` with your management API hostname to each `zuplo deploy` command so it targets your cluster. See [zuplo deploy](../../cli/deploy.mdx).

The simplest pipeline deploys your API to Zuplo on every push to main.

```yaml title="bitbucket-pipelines.yml"
image: node:24

pipelines:
  branches:
    main:
      - step:
          name: Deploy to Zuplo
          script:
            - npm install
            - npx zuplo deploy --api-key "$ZUPLO_API_KEY"
```

Store `ZUPLO_API_KEY` in **Repository settings** > **Pipelines** > **Repository
variables**.

## Next Steps

- Add [automated testing](./deploy-and-test.mdx) after deployment
- Set up [PR preview environments](./pr-preview-environments.mdx)
