Created
January 29, 2017 15:44
-
-
Save pladaria/8d31b09631b2baa38e34b0b3da982da7 to your computer and use it in GitHub Desktop.
Simple shell script to deploy heroku services
This file contains hidden or 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
#!/usr/bin/env bash | |
DEPLOY_PATH=/tmp/heroku-deploy-`date +%s`/ | |
HEROKU_NAME="put-your-heroku-service-name-here" | |
rm -rf $DEPLOY_PATH | |
mkdir -p $DEPLOY_PATH | |
rsync -av . $DEPLOY_PATH --exclude node_modules | |
cd $DEPLOY_PATH | |
git init | |
heroku git:remote -a $HEROKU_NAME | |
git add -A . | |
git commit -m "deploy" | |
git push -f heroku master | |
cd - | |
rm -rf $DEPLOY_PATH | |
echo "🚀 https://$HEROKU_NAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment