-
-
Save flenter/bbcee41fe7e70752bc24 to your computer and use it in GitHub Desktop.
This file contains 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
box: wercker/rvm | |
# Build definition | |
# See the Rails section on the wercker devcenter: | |
# http://devcenter.wercker.com/articles/languages/ruby/settingup-rails4.html | |
# You will want to define your database as follows: | |
services: | |
- wercker/postgresql | |
# See more about services on our devcenter: | |
# http://devcenter.wercker.com/articles/services/ | |
build: | |
steps: | |
# Uncomment this to force RVM to use a specific Ruby version | |
# - rvm-use: | |
# version: 2.1.0 | |
# A step that executes `bundle install` command | |
- bundle-install | |
# A step that prepares the database.yml using the database in services | |
- rails-database-yml: | |
service: postgresql | |
# A custom script step, name value is used in the UI | |
# and the code value contains the command that get executed | |
- script: | |
name: echo ruby information | |
code: | | |
echo "ruby version $(ruby --version) running" | |
echo "from location $(which ruby)" | |
echo -p "gem list: $(gem list)" | |
# Add more steps here: | |
# - script: | |
# name: Set up DB | |
# code: bundle exec rake db:schema:load RAILS_ENV=test | |
# | |
# - script: | |
# name: RSpec | |
# code: bundle exec rspec | |
deploy: | |
steps: | |
- heroku-deploy: | |
install-toolbelt: true | |
- script: | |
name: Migrate DB | |
code: heroku run rake db:migrate --app $HEROKU_APP_NAME | |
- script: | |
name: Update assets | |
code: heroku run rake add_static_assets --app $HEROKU_APP_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment