zhiwenxuan / my-web-note

知识体系构建
16 stars 7 forks source link

Firebase 发布 #52

Open zhiwenxuan opened 3 years ago

zhiwenxuan commented 3 years ago

发布前端

  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
  2. 使用 firebase login:ci 获取 token
  3. 使用 firebase deploy --only hosting --project ${PROJECT_NAME} --token ${TOKEN}
zhiwenxuan commented 3 years ago

配置动态链接 Dynamic Links

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