Created
March 31, 2014 00:10
-
-
Save outrightmental/9882363 to your computer and use it in GitHub Desktop.
My best attempt to integrate Travis CI to deploy /dist folder to Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Travis CI > Heroku | |
# deploy /dist folder | |
# | |
# author: Nick Kaye | |
# laboratory: Outright Mental Inc. | |
# | |
# NOTES: | |
# Heroku & Compass CLI in Gemfile for Bundler | |
# Bower & Grunt CLI in Package.json for Npm | |
# Travis Cache Bundler & Npm | |
# | |
language: node_js | |
node_js: | |
- '0.10' | |
install: | |
- bundle install | |
- bower install | |
cache: | |
bundler: true | |
directories: | |
- node_modules | |
after_success: | |
# Turn off warnings about SSH keys: | |
- echo "Host heroku.com" >> ~/.ssh/config | |
- echo " StrictHostKeyChecking no" >> ~/.ssh/config | |
- echo " CheckHostIP no" >> ~/.ssh/config | |
- echo " UserKnownHostsFile=/dev/null" >> ~/.ssh/config | |
# Clear your current Heroku SSH keys: | |
- heroku keys:clear | |
# Add a new SSH key to Heroku | |
- yes | heroku keys:add | |
# Clone Heroku deployment repo to dist folder | |
- git clone [email protected]:qurrus-web-prod.git dist | |
# Build | |
- grunt build | |
# Commit and Push dist folder to Heroku | |
- cd dist | |
- git config --global user.name "INSERT Your Name" | |
- git config --global user.email "[email protected]" | |
- git add * | |
- git commit -am "Travis CI" | |
- git push origin master | |
env: | |
global: | |
secure: <<< INSERT YOUR travis-encrypted HEROKU_API_KEY=abc-your-heroku-api-key-abc >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clone Heroku deployment repo to dist folder
fatal: destination path 'dist' already exists and is not an empty directory.
I can't get it. Cant see the whole process and logic. Need help!