Aurabase Logo
aurabasedocs
docs›Guides›Branch previews

Branch previews by pull request

An ephemeral Postgres database, deployed edge functions and a unique URL by PR GitHub. Provisioning in 10 seconds via copy-on-write, auto cleanup at merge.

8 min read·Level intermediate·Revised on Apr 15, 2026
This English text was generated automatically from the French original and has not been reviewed yet.
Attention

Roadmap — not available. Branch previews (Postgres copy-on-write clone by PR) are a planned feature, not yet delivered. This guide describes the target model; The GitHub commands and action below are not yet functional.

#
Concept

One PR = a complete environment

With each push to a GitHub branch, an action creates a new Aurabase branch: Postgres copy-on-write clone, unique API keys, deployed edge functions, auto-commented URL on the PR. Reviewers test without contention.

Astuce

Copy-on-write = almost instantaneous even on 100 GB databases. You only pay for deltas written to the branch.

#
Setup

A GitHub Action, 12 lines

.github/workflows/preview.ymlyaml
name: Preview env
on:
  pull_request: { types: [opened, synchronize, closed] }

jobs:
  preview:
    runs-on: ubuntu-latest
    steps:
      - uses: aurabase/preview-action@v2
        with:
          token: ${{ secrets.AURA_TOKEN }}
          seed-from: prod    # or staging, dev
          seed-count: 1000

The action automatically comments the PR with the URL, test credentials (disposable anon key), and a status badge. At merge or close, it cleans the branch.

#
seed

Clone a production fraction

seed-from: prod + seed-count: 1000 clones 1000 random rows per table (anonymized if pii). For deterministic seeding, define an SQL script in supabase/seed.sql.

Attention

PII data is automatically hidden in previews (emails, phones, names). Your column must be tagged comment on column ... is 'pii'.

#
TTL & quotas

72h / 14 days / unlimited

Previews are automatically cleaned at merge. If a PR drags, the TTL comes into play: 72 hours on Free (1 preview max), 14 days on Pro (10 max), unlimited on Enterprise.

Last updated · Apr 15, 2026