Skip to content
orbitpush

Deploy from CI

Deploy on every push with GitHub Actions or any other CI provider.

In CI, deploy needs two things: the committed orbitpush.json and the BUNNY_API_KEY environment variable. It never asks questions and never creates a site, so a missing file stops the job instead of creating new zones.

1. Set up the site once

Run npx orbitpush deploy (or orbitpush init) on your machine, then commit orbitpush.json.

2. Add the API key as a secret

Store your bunny.net API key as a CI secret named BUNNY_API_KEY. In GitHub: Settings → Secrets and variables → Actions → New repository secret.

The account API key has full access to your bunny.net account. Keep it in your CI provider’s secret store, never in the repository.

3. Deploy in your workflow

GitHub Actions

.github/workflows/deploy.yml:

name: Deploy

on:
  push:
    branches: [main]

concurrency:
  group: deploy
  cancel-in-progress: false

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npm run build
      - run: npx orbitpush deploy
        env:
          BUNNY_API_KEY: ${{ secrets.BUNNY_API_KEY }}

The concurrency group keeps two deploys from running at the same time.

Other CI providers

Any provider works the same way: build, then run npx orbitpush deploy with BUNNY_API_KEY set from a secret.

npm ci
npm run build
npx orbitpush deploy

What counts as CI

orbitpush asks nothing when stdin or stderr is not a terminal, or when CI is set to anything but false or 0. Most CI providers set CI=true. See AI coding agents and scripts for exit codes and the rules each command follows without a terminal.