I have multiple Supabase edge functions I want to deploy simultaneously when I push to production. These are all the functions in my .supabase/functions
folder, ie:
.supabase
functions
my_function_1
index.ts
my_function_2
index.ts
...
The Supabase CLI docs explain how to deploy a single function with supabase functions deploy <Function name> [flags]
, but don't seem to mention deploying all of them together.
Do I have to run the deploy command once for each function? For ex:
supabase functions deploy my_function_1 && supabase functions deploy my_function_2
Or is there a simpler way?
I tried simply running supabase functions deploy
but got this error indicating that I need to pass a function name as an arg:
Error: accepts 1 arg(s), received 0
Usage:
supabase functions deploy <Function name> [flags]
The firebase functions equivalent would be firebase deploy --only functions
(docs)
It is now possible to deploy all functions to a linked project in Supabase:
Just run this:
supabase functions deploy
You can also set parameters (that will be used on all deployments):
supabase functions deploy --import-map import_map.json --no-verify-jwt --project-ref xxsupanachoxx