The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: update edge functions ci/cd guide (#20652)
Lakshan Perera4fb6390303c7
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.tsindex d066bb7ff97..ec26db6379d 100644--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts@@ -1093,7 +1093,7 @@ export const functions: NavMenuConstant = {url: '/guides/functions/regional-invocation',},{- name: 'Deploying with GitHub Actions',+ name: 'Deploying with CI / CD pipelines',url: '/guides/functions/cicd-workflow',},],diff --git a/apps/docs/pages/guides/functions/cicd-workflow.mdx b/apps/docs/pages/guides/functions/cicd-workflow.mdxindex e218a4cc744..05347734533 100644--- a/apps/docs/pages/guides/functions/cicd-workflow.mdx+++ b/apps/docs/pages/guides/functions/cicd-workflow.mdx@@ -2,15 +2,17 @@ import Layout from '~/layouts/DefaultGuideLayout'export const meta = {id: 'cicd-workflow',- title: 'Deploying with GitHub Actions',- description: 'Use GitHub Actions as a CI / CD pipeline to deploy your Edge Functions.',- subtitle: 'Use GitHub Actions as a CI / CD pipeline to deploy your Edge Functions.',+ title: 'Deploying with CI / CD pipelines',+ description: 'Use GitHub Actions, Bitbucket, and GitLab CI to deploy your Edge Functions.',+ subtitle: 'Use GitHub Actions, Bitbucket, and GitLab CI to deploy your Edge Functions.',tocVideo: '6OMVWiiycLs',}-You can use the official [`setup-cli` GitHub Action](https://github.com/marketplace/actions/supabase-cli-action) to run Supabase CLI commands in your GitHub Actions.+You can use popular CI / CD tools like GitHub Actions, Bitbucket, and GitLab CI to automate Edge Function deployments.++## GitHub Actions-## Sample workflow+You can use the official [`setup-cli` GitHub Action](https://github.com/marketplace/actions/supabase-cli-action) to run Supabase CLI commands in your GitHub Actions.The following GitHub Action deploys all Edge Functions any time code is merged into the `main` branch:@@ -41,6 +43,67 @@ jobs:- run: supabase functions deploy --project-ref $PROJECT_ID```+## GitLab CI++Here is the sample pipeline configuration to deploy via GitLab CI.++```yaml+image: node:18++# List of stages for jobs, and their order of execution+stages:+ - setup+ - deploy++# This job runs in the setup stage, which runs first.+setup-npm:+ stage: setup+ script:+ - npm i supabase+ cache:+ paths:+ - node_modules/+ artifacts:+ paths:+ - node_modules/++# This job runs in the deploy stage, which only starts when the job in the build stage completes successfully.+deploy-function:+ stage: deploy+ script:+ - npx supabase init+ - npx supabase functions deploy --debug+ services:+ - docker:dind+ variables:+ DOCKER_HOST: tcp://docker:2375+```++## Bitbucket Pipelines++Here is the sample pipeline configuration to deploy via Bitbucket.++```yaml+image: node:18++pipelines:+ default:+ - step:+ name: Setup+ caches:+ - node+ script:+ - npm i supabase+ - parallel:+ - step:+ name: Functions Deploy+ script:+ - npx supabase init+ - npx supabase functions deploy --debug+ services:+ - docker+```+## Declarative configurationIndividual function configuration like [JWT verification](/docs/guides/cli/config#functions.function_name.verify_jwt) and [import map location](/docs/guides/cli/config#functions.function_name.import_map) can be set via the `config.toml` file.