Skip to content

Instantly share code, notes, and snippets.

@MarkNijhof
Forked from markbates/.travis.yml
Created September 14, 2012 20:29
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MarkNijhof/443c00fe346045522db7 to your computer and use it in GitHub Desktop.
Save MarkNijhof/443c00fe346045522db7 to your computer and use it in GitHub Desktop.
pushing to heroku with travis
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>
- yes | ruby travis-deployer.rb
- heroku keys:clear
- yes | heroku keys:add
- git push heroku master # or whatever your heroku push looks like
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