0.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Push from your git repo to a heroku app without any external configuration.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0

Runtime

 Project Readme

Build Status Dependency Status Code Climate

HerokuHeadless

What?

Push from your git repo to a heroku app without any external configuration.

Why?

Heroku's workflow is geared towards pushing to a heroku app from a dev workstation. This gem makes it easy to push to a heroku app as part of a CI/CD setup.

Installation

Add this line to your application's Gemfile:

gem 'heroku-headless'

And then execute:

$ bundle

Or install it yourself as:

$ gem install heroku-headless

How do I use this?

It's as simple as

require 'heroku-headless'
HerokuHeadless::Deployer.deploy( 'your-app-name' )

Use it with pre- and post-commands:

require 'heroku-headless'

  app_name = 'my-heroku-app-name'
  remote_name = 'herokuheadless'

  puts "deploying to heroku app #{app_name}"
  remote_name = "headlessheroku"
  HerokuHeadless.configure do | config |
    config.post_deploy_commands = ['rake db:migrate']
    config.pre_deploy_git_commands = [
      "git remote -v",
      "git checkout master",
      "git commit -am  \"changes from headless deploy\" ",
      "git remote add #{remote_name} git@heroku.com:#{app_name}.git",
      "git fetch #{remote_name}",
      "git merge -m \"merged by automatic deploy\" #{remote_name}/master"]
  end

  result = HerokuHeadless::Deployer.deploy( app_name )
  puts "successfully deployed to #{app_name}" if result
  exit result ? 0 : 1

Restart processes after deployment and post-commands:

require 'heroku-headless'

  app_name = 'my-heroku-app-name'
  remote_name = 'herokuheadless'

  puts "deploying to heroku app #{app_name}"
  remote_name = "headlessheroku"
  HerokuHeadless.configure do | config |
    config.post_deploy_commands = ['rake db:migrate']
    config.restart_processes = true
  end

  result = HerokuHeadless::Deployer.deploy( app_name )
  puts "successfully deployed to #{app_name}" if result
  exit result ? 0 : 1

Enable force push:

require 'heroku-headless'

 app_name = 'my-heroku-app-name'

 HerokuHeadless.configure do | config |
   config.force_push = true   
 end

 result = HerokuHeadless::Deployer.deploy( app_name )
 puts "successfully deployed to #{app_name}" if result
 exit result ? 0 : 1

Tell me more!

Deploying To Heroku From CI

Deploying to Heroku From CI - the Gory Details