Skip to content
Home

集成

Use Supabase branching with hosting providers and other tools

分支功能可以与支持预览部署的托管服务配合使用。了解如何将 Supabase 分支功能与各种平台和工具集成。

🌐 Branching works with hosting providers that support preview deployments. Learn how to integrate Supabase branching with various platforms and tools.

主机提供商 #

🌐 Hosting providers

通过 Supabase 分支集成,你可以将托管提供商使用的 Git 分支与对应的 Supabase 预览分支同步。这意味着托管提供商构建的预览部署将与正确的数据库架构、边缘函数和其他 Supabase 配置相匹配。

🌐 With the Supabase branching integration, you can sync the Git branch used by the hosting provider with the corresponding Supabase preview branch. This means that the preview deployment built by your hosting provider is matched to the correct database schema, edge functions, and other Supabase configurations.

Vercel#

安装 Vercel 集成:

🌐 Install the Vercel integration:

  • Vercel 市场
  • 通过点击 Supabase 示例应用中 README 文件里的蓝色 Deploy 按钮

确保你已经把你的 Supabase 项目连接到 Vercel 项目上。

🌐 And make sure you have connected your Supabase project to your Vercel project.

Supabase 会自动用对应预览分支的正确环境变量更新你的 Vercel 项目。同步会在 Pull Request 打开时进行,而不是在分支创建时。

🌐 Supabase automatically updates your Vercel project with the correct environment variables for the corresponding preview branches. The synchronization happens at the time of Pull Request being opened, not at the time of branch creation.

由于分支集成与 Vercel 的预览部署功能相关,所以 Supabase 设置正确变量和 Vercel 运行部署过程之间可能会有竞争条件。因此,Supabase 总是会自动重新部署该拉取请求的最新部署。

🌐 As branching integration is tied to the Preview Deployments feature in Vercel, there are possible race conditions between Supabase setting correct variables, and Vercel running a deployment process. Because of that, Supabase is always automatically re-deploying the most recent deployment of the given pull request.