Skip to content

Build & Deploy

Deploy your Pulsabase project with a single command.

  1. Build your frontend (if applicable)

    Terminal window
    npm run build
  2. Deploy to Pulsabase

    Terminal window
    pulsabase deploy

    If your build output directory is not dist, specify it:

    Terminal window
    pulsabase deploy --dir build

The pulsabase deploy command:

  1. Schema sync — Diffs your model decorators against the database and applies migrations
  2. RLS policies — Generates and applies Row-Level Security policies from your @Allow / @Owner decorators
  3. Edge functions — Deploys any new or updated edge function sequences
  4. Static hosting — Uploads your built frontend to Pulsabase Hosting (if configured)
Terminal window
# Initialize a new Pulsabase project
pulsabase init
# Login to your account
pulsabase login
# Deploy
pulsabase deploy
# Deploy with a specific build directory
pulsabase deploy --dir build
# Deploy in CI/CD (uses PULSABASE_API_KEY env var)
PULSABASE_API_KEY=pk_live_xxx pulsabase deploy
name: Deploy to Pulsabase
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npm run build
- run: npx @pulsabase/cli deploy --dir dist
env:
PULSABASE_API_KEY: ${{ secrets.PULSABASE_API_KEY }}