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

Travis CI-不部署生成文件夹?

  •  0
  • rb612  · 技术社区  · 6 年前

    我正在尝试使用Travis CI部署到Github页面,但是 build 无法在分支上提交文件夹。这似乎可以通过添加 skip_cleanup: true (我也试过 skip-cleanup: true 但它仍然不部署生成文件夹。

    这是我的 .travis.yml .有什么可能导致这种情况的想法吗?

    language: node_js
    node_js:
      - 10
    cache:
      directories:
        - node_modules
    script:
      - npm run build
      - npm test
    deploy:
      provider: pages
      skip_cleanup: true
      github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
      keep-history: true
      on:
        branch: master
    
    1 回复  |  直到 6 年前
        1
  •  0
  •   rb612    6 年前

    解决方案是我需要将生成文件夹添加到 .gitignore 这样Travis就可以提交文件了。