my-web-note icon indicating copy to clipboard operation
my-web-note copied to clipboard

Firebase 发布

Open zhiwenxuan opened this issue 4 years ago • 1 comments

发布前端

  1. 如果使用翻墙代理,需要设置 http_proxyhttps_proxy 环境变量。端口要看翻墙软件的配置。Mac 系统 shadowsocks 一般是 1087, windows 系统下一般是 1080
export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;export NO_PROXY=localhost,127.0.0.1
  1. 使用 firebase login:ci 获取 token
  2. 使用 firebase deploy --only hosting --project ${PROJECT_NAME} --token ${TOKEN}

zhiwenxuan avatar Dec 21 '20 07:12 zhiwenxuan

配置动态链接 Dynamic Links

  1. 首先在 hosting 自定义域名
  2. 在 firebase.json 中配置重定向规则,并发布
"hosting": {
    "appAssociation": "AUTO",
    //...
    "rewrites": [
      {
        "source": "/links/share/**",
        "dynamicLinks": true
      }
    ]
  }
  1. 之后在 Dynamic Links 选择域名

zhiwenxuan avatar Dec 21 '20 12:12 zhiwenxuan