An open API service indexing awesome lists of open source software.

https://github.com/thorwebdev/supa-edge-func-github-action-deploy

Example deploying Supabase Edge Functions via GitHub Actions
https://github.com/thorwebdev/supa-edge-func-github-action-deploy

Last synced: about 1 year ago
JSON representation

Example deploying Supabase Edge Functions via GitHub Actions

Awesome Lists containing this project

README

          

# GitHub Actions Deploy

This example includes a [deploy GitHub Action](./.github/workflows/deploy.yaml) that automatically deploys your Supabase Edge Functions when pushing to or merging into the main branch.

You can use the [`setup-cli` GitHub Action](https://github.com/marketplace/actions/supabase-cli-action) to run Supabase CLI commands in your GitHub Actions, for example to deploy a Supabase Edge Function:

```yaml
name: Deploy Function

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest

env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
PROJECT_ID: zdtdtxajzydjqzuktnqx

steps:
- uses: actions/checkout@v3

- uses: supabase/setup-cli@v1
with:
version: 1.0.0

- run: supabase functions deploy github-action-deploy --project-ref $PROJECT_ID
```