成功构建后,Travis-ci不会更新我的firebase托管网站我使用angular(2-4)

时间:2017-05-16 22:24:15

标签: angular firebase github travis-ci firebase-hosting

我在Travis上添加了FIREBASE_TOKEN,我是从firebase登录生成的:ci

我只在travis上出现此错误

enter image description here

.travis.yml

#.travis.yml

language: node_js
node_js:
  - "7"

branches:
  only:
    - master

before_script:
  - npm install -g firebase-tools
  - npm install -g @angular/cli

script:
  - ng build --prod

after_success:
  - firebase deploy --token $FIREBASE_TOKEN

notifications:
  email:
    on_failure: change
    on_success: change

我不确定,但这是我从角度CLI

的git ignore文件

/ dist文件夹没有在GitHub repo上推送,因为角度CLI默认gitignore,我可以取消注释dist与git ignore file吗?

的.gitignore

# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db

1 个答案:

答案 0 :(得分:0)

我忘记在.travis.yml内部添加此代码,因为我为项目使用了别名

after_success:
  - firebase use --add my-alias
  - firebase deploy --token $FIREBASE_TOKEN