Files
supabase/examples/edge-functions/supabase/functions/github-action-deploy
Lakshan Perera 67367d7f4e chore: updated Edge Functions examples (#18742)
* Removed the use of deprecated std/http in favor of Deno.serve
* Use full import paths instead of using paths from import maps (less
  confusing, easy to copy examples)
* Formatted all examples with `deno fmt`
2023-11-06 19:55:22 +11:00
..
2023-06-01 12:58:01 +08:00

GitHub Actions Deploy

This example includes a deploy GitHub Action that automatically deploys your Supabase Edge Functions when pushing to or merging into the main branch.

You can use the setup-cli GitHub Action to run Supabase CLI commands in your GitHub Actions, for example to deploy a Supabase Edge Function:

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: latest

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