Forked from abinoam/codeship_heroku_with_maintenance_mode.sh
Last active
October 12, 2016 08:45
-
-
Save ognus/227635bbbc799cc14907c0fdeb9b7570 to your computer and use it in GitHub Desktop.
Codeship custom script for Heroku deploying with maintenance mode
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
#!/bin/sh | |
# This codeship custom script depends on: | |
# - API_KEY env var from Heroku | |
# - STAGING_APP_URL | |
set -e | |
export HEROKU_API_KEY="${API_KEY}" | |
# Add Heroku remote | |
git remote add heroku "git@heroku.com:${STAGING_APP_NAME}.git" | |
# Push build folder to heroku | |
git push heroku $(git subtree split --prefix build build):master --force | |
# check if the app is up and running | |
check_url "${STAGING_APP_URL}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment