Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

supabase/fly-preview

Repository files navigation

⚙️ Supabase Preview Deploy Action

About

This action deploys a Supabase Preview branch on Fly infrastructure.

⚠️ Experimental: This action is a WIP and may be deprecated in the future. Use at your own risk.

Usage

Setup this action and supabase CLI

steps:
  - uses: supabase/setup-cli@v1
    with:
      version: latest
  # We use sed to replace quotes, ie. key="value", to avoid double escaping env var.
  - run: supabase gen keys --project-ref <ref> --experimental | sed -E 's|^(.*)="(.*)"$|\1=\2|g' >> "$GITHUB_ENV"
    env:
      SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
  - uses: supabase/fly-preview@main

Connect locally to your preview branch

supabase link --project-ref <ref>
supabase start --preview

Inputs

The actions supports the following environment variable as inputs:

Name Type Description Default Required
FLY_API_TOKEN String API token to your Fly account true
NEXT_PUBLIC_SUPABASE_URL String Fly app hostname, ie. *.fly.dev true
FLY_ORGANIZATION_SLUG String Fly organization slug to deploy to personal false
SUPABASE_DB_PASSWORD String Postgres role password postgres false
SUPABASE_AUTH_JWT_SECRET String JWT secret for GoTrue service false
SUPABASE_AUTH_ANON_KEY String Signed JWT token for anon role false
SUPABASE_AUTH_SERVICE_ROLE_KEY String Signed JWT token for service_role false

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published