I am trying to deploy an AngularJS app onto a Divshot hosting through Travis CI.
This app contains a /dist directory which is:
- where the result of the Grunt build goes (as it does in local)
.gitignored, therefore not pushed (Travis has to rebuild it)- set as the Divshot app's root directory
Travis installs deps and runs the build nicely, thanks to this .travis.yml file:
language: node_js
node_js:
- '0.10'
install:
- "npm install"
- "gem install compass"
- "bower install"
script:
- "grunt build"
deploy:
provider: divshot
environment:
master: development
api_key:
secure: ...
skin_cleanup: true
But when it comes to the deployment, Travis says:
Error: Your app's root directory does not exists.
It's actually a message from divshot-cli because the /dist dir does not exist. I get the exact same message when I do a divshot push in local after having removed the /dist dir.
Here is a build which cannot deploy: https://travis-ci.org/damrem/anm-client/builds/35582994
How come the /dist dir does not exist on the Travis VM after install & building run OK?
Notes:
- I tried to replace the
scriptstep by abefore_deploystep, but the problem remains (build #13). - If I push a pre-existing
/distfolder with anindex.htmlin it, it deploys nicely (https://travis-ci.org/damrem/anm-client/builds/35583904)
It looks like this might be caused by a typo. At the bottom you have
skin_cleanup: truewhen it should beskip_cleanup: true. If skip cleanup isn't turned on Travis will "reset" the code to the exact state of git checkout before running deploy.