You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Google Cloud Build部署时指定Firebase站点ID?

可以指定部署的Firebase站点ID

完全可以在你的cloudbuild.yaml配置里指定要部署的站点ID,只需要在Firebase deploy命令中添加--site参数即可。

修改后的cloudbuild.yaml配置如下:

steps :
  - name : node
    entrypoint : npm
    args :
      - ci
  - name : node
    entrypoint : npm
    args :
      - run
      - build
  - name : asia.gcr.io/$_project_id/firebase
    args :
      - deploy
      - --project=xxxxxxxxx
      - --only=hosting
      - --site=你的测试站点ID

说明:

  • 把你的测试站点ID替换成你实际的staging站点ID,这个ID可以在Firebase控制台的Hosting页面中找到(站点列表里每个站点对应的标识符)。
  • 如果不指定--site参数,Firebase会默认部署到项目的默认站点,加上这个参数就能精准指定目标部署站点。

内容的提问来源于stack exchange,提问作者Choo Tze Sien

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.21 10:45:38