mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
---
|
|
id: cicd-workflow
|
|
title: CI / CD Workflow
|
|
description: How to deploy Supabase Edge Functions with a CI / CD pipeline.
|
|
---
|
|
|
|
As described in the Supabase CLI [CI / CD Workflow documentation](/docs/guides/cli/cicd-workflow), 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 your-function-name --project-ref $PROJECT_ID
|
|
```
|
|
|
|
See the [example on GitHub](https://github.com/supabase/supabase/blob/master/examples/edge-functions/.github/workflows/deploy.yaml).
|