Home

Deploying with GitHub Actions

As described in the Supabase CLI Environments Guide, 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: 1.0.0

      - run: supabase functions deploy your-function-name --project-ref $PROJECT_ID

See the example on GitHub.

Need some help?

Not to worry, our specialist engineers are here to help. Submit a support ticket through the Dashboard.