Skip to content

Instantly share code, notes, and snippets.

@josephhhhh
Last active February 22, 2018 21:50
Show Gist options
  • Save josephhhhh/3cae85d2dd9eb1ada67eda3e556828fd to your computer and use it in GitHub Desktop.
Save josephhhhh/3cae85d2dd9eb1ada67eda3e556828fd to your computer and use it in GitHub Desktop.
node app deploy heroku bash script
#!/bin/bash
# usage: ./deploy.sh <github_repo> <app_name>
# perform local testing
repo=$1
git clone $repo _repo
cd _repo
npm install
npm test
# start deploying
app=$2
heroku create $app;
git remote set-url heroku https://git.heroku.com/${app}.git
git push heroku master;
heroku ps:scale web=1;
heroku open;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment