我有多个 Supabase 边缘功能,希望在投入生产时同时部署。这些是我的文件夹中的所有功能.supabase/functions,即:
.supabase
functions
my_function_1
index.ts
my_function_2
index.ts
...
Run Code Online (Sandbox Code Playgroud)
Supabase CLI 文档解释了如何使用 部署单个函数supabase functions deploy <Function name> [flags],但似乎没有提及将所有函数一起部署。
我是否必须为每个函数运行一次部署命令?例如:
supabase functions deploy my_function_1 && supabase functions deploy my_function_2
Run Code Online (Sandbox Code Playgroud)
或者有更简单的方法吗?
我尝试简单地运行supabase functions deploy,但收到此错误,表明我需要将函数名称作为参数传递:
Error: accepts 1 arg(s), received 0
Usage:
supabase functions deploy <Function name> [flags]
Run Code Online (Sandbox Code Playgroud)
等价的 firebase 函数是firebase deploy --only functions(文档)
supabase ×1