【问题标题】:Trouble deploying a static Angular / Yeoman project in Travis CI to S3 (Grunt issue)将 Travis CI 中的静态 Angular / Yeoman 项目部署到 S3 时遇到问题(Grunt 问题)
【发布时间】:2014-04-11 11:11:20
【问题描述】:

我正在尝试将项目部署到 S3,但我在使用 grunt build 步骤时遇到了问题。在我的 Mac(10.9,节点 0.10)本地,grunt build 步骤完美运行。如果我使用命令行客户端手动部署到 s3,一切正常。

但是当我使用 Travis 时,当我的脚本被连接时,它似乎遗漏了我的服务和指令。在 Travis 日志中,看起来应该添加它们(例如第 2054 行)。

这是我的.travis.yml 文件:

language: node_js
node_js:
- '0.10'
before_script:
- gem install compass
- npm install
- npm install bower
- bower install
- npm install grunt-cli
- grunt build
deploy:
  provider: s3
  access_key_id: AKIAISJMRUQ4YJVE4AYA
  secret_access_key:
    secure:     E1SMwWvV4J2OWS+kQcu/DnCaVR+Jf1wigk+guvlAS9YcqQuaVJNMDiMWJdoHO6tnv3PIY2JtVgxMA4IRpW9F0RDHeJh2k6C5D+szw0x+XRnfbTx57YLw2c1b+IwXKp5Rl7hAzVsvaUZC4NuU6vbwxS+SOKIsICfq6r2VmpS0zoY=
  bucket: lastfm-angular
  on:
    repo: keymholio/lastfm-angular

我的仓库在这里:https://github.com/keymholio/lastfm-angular

我的 travis 版本在这里:https://travis-ci.org/keymholio/lastfm-angular/builds/22743947

部署站点:http://lastfm-angular.s3-website-us-east-1.amazonaws.com/

【问题讨论】:

    标签: angularjs gruntjs travis-ci yeoman-generator grunt-usemin


    【解决方案1】:

    通过注释掉Gruntfile 中的concat 步骤解决了我的问题。

    https://github.com/keymholio/lastfm-angular/commit/b4e70a4f2511593c3b1dc62cbd105e182bb7d135

    【讨论】:

    • 既然你正在部署由grunt build任务创建的目录,为什么不在'.travis.yml'文件中包含local-dir: dist?我这样做了,但收到这样的错误消息:chdir': No such file or directory - dist
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-01-26
    • 1970-01-01
    • 2014-10-20
    • 1970-01-01
    • 1970-01-01
    • 2011-06-03
    • 1970-01-01
    相关资源
    最近更新 更多