Skip to content

Instantly share code, notes, and snippets.

@asci
Last active December 30, 2015 22:25
Show Gist options
  • Save asci/72b2f22a62a93f001de3 to your computer and use it in GitHub Desktop.
Save asci/72b2f22a62a93f001de3 to your computer and use it in GitHub Desktop.
deployment
{
"script" : "bin/www"
}
rm -rf node_modules
npm i
pm2 delete all
pm2 start ./scripts/deploy.json --env production
[remote "prod"]
url = ssh://[email protected]/path/to/project
fetch = +refs/heads/master:refs/remotes/prod/master
#!/bin/sh
cd ..
GIT_DIR='.git'
git reset --hard
sh ./scripts/deploy.sh
git init
git config receive.denyCurrentBranch ignore
nano .git/hooks/post-receive
chmod +x .git/hooks/post-receive
npm i pm2 -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment