Skip to content

Instantly share code, notes, and snippets.

@outrightmental
Created March 31, 2014 00:10
Show Gist options
  • Save outrightmental/9882363 to your computer and use it in GitHub Desktop.
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
#
# 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 >>>
@lumitest
Copy link

lumitest commented Jun 8, 2016

Clone Heroku deployment repo to dist folder

  • git clone [email protected]:qurrus-web-prod.git dist
    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment