🔍⌘K

Start typing to search docs.

Automation Recipes

1.0.0

CI/CD patterns and scripting practices for Forge automation.

Continuous deployment (Vercel + Supabase)

# .github/workflows/forge-cd.yml
name: Forge Deploy
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v3
        with:
          version: 10
      - run: pnpm install --frozen-lockfile
      - run: pnpm forge provision demo-app production --provider supabase --update-env
      - run: pnpm forge deploy demo-app production --json
        env:
          SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
  • Provision updates secrets + .env.generated before deploying.
  • --json makes it easy to parse results for Slack notifications.

Nightly drift detection

Schedule a dry-run provisions job to detect infrastructure drift between Supabase, Pulumi, and the generated config.

pnpm forge provision demo-app production --dry-run --provider supabase --force

Send the output to your observability stack and alert when changes appear.

CLI in customer onboarding

Use the CLI from onboarding flows to generate preview environments per customer.

  1. Create the organization in Supabase via the dashboard.
  2. Trigger pnpm forge new with scoped defaults (apps.yaml entry per template).
  3. Call <DocLink slug={["forge-api", "reference"]}>Forge API</DocLink> to fetch generated domains and surface them in the dashboard.

Success

Combine config helpers with CI secrets to generate apps per branch, then tear them down when tests pass.