metaodi / .travis.yml secret
Created — forked from MarkNijhof/.travis.yml

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

pushing to heroku with travis

View .travis.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14
language: ruby
rvm:
- 1.9.3
 
#after_install:
# I had to move all the steps into the after_script to get them called
 
after_script:
- gem install heroku
- export HEROKU_API_KEY=<your key here> # you probably want to encrypt this key using the travis gem and "travis encryp" cmd
- yes | ruby travis_deployer.rb
- heroku keys:clear
- yes | heroku keys:add
- git push heroku master # or whatever your heroku push looks like
View .travis.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
File.open(".git/config", "a") do |f|
f.puts <<-EOF
[remote "heroku"]
url = url = git@heroku.com:your-app-here.git
fetch = +refs/heads/*:refs/remotes/heroku/* # had to change this into remote name instead of app name
EOF
end
 
known_hosts = File.expand_path("~/.ssh/config")
File.open(known_hosts, "a") do |f|
f.puts <<-EOF
Host heroku.com
StrictHostKeyChecking no
CheckHostIP no
UserKnownHostsFile=/dev/null
EOF
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.