代码之家  ›  专栏  ›  技术社区  ›  Guy

Travis与firebase托管和创建react应用程序:找不到公共目录

  •  1
  • Guy  · 技术社区  · 8 年前

    instructions 然而,我的特拉维斯建筑之所以失败,是因为:

    这个 成功但部署失败。Travis的firebase gem会忽略firebase.json中的宿主/公钥吗?

    我的特拉维斯·伊姆

      language: node_js
      warnings_are_errors: false
      node_js:
      - '9'
      before_script:
      - export CI=false
      cache:
        yarn: true
        directories:
          - node_modules
      before_deploy:
        - yarn build
      deploy:
        provider: firebase
        token:
          secure: xxx
      env:
        global:
        - secure: xxx
    

    我的firebase.json

    {
      "database": {
        "rules": "database.rules.json"
      },
      "hosting": {
        "public": "build",
        "ignore": [
          "firebase.json",
          "**/.*",
          "**/node_modules/**"
        ],
        "rewrites": [
          {
            "source": "**",
            "destination": "/index.html"
          }
        ]
      }
    }
    
    1 回复  |  直到 8 年前
        1
  •  6
  •   kncvetko    7 年前

    添加

    deploy:
       skip_cleanup: true
    

    致你的特拉维斯·yml。git stash--all步骤将在部署阶段之前删除本地构建目录。因此它找不到您的生成目录。