Skip to content

Instantly share code, notes, and snippets.

@pladaria
Created January 29, 2017 15:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pladaria/8d31b09631b2baa38e34b0b3da982da7 to your computer and use it in GitHub Desktop.
Save pladaria/8d31b09631b2baa38e34b0b3da982da7 to your computer and use it in GitHub Desktop.
Simple shell script to deploy heroku services
#!/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