https://github.com/supabase/fly-preview
https://github.com/supabase/fly-preview
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/supabase/fly-preview
- Owner: supabase
- License: mit
- Archived: true
- Created: 2023-04-20T04:54:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-08T06:28:57.000Z (over 2 years ago)
- Last Synced: 2024-10-29T12:34:02.807Z (almost 2 years ago)
- Language: TypeScript
- Size: 1.57 MB
- Stars: 3
- Watchers: 20
- Forks: 11
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# :gear: Supabase Preview Deploy Action


## About
This action deploys a Supabase Preview branch on Fly infrastructure.
> :warning: **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
```yaml
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 --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
```bash
supabase link --project-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 |