Last active
December 30, 2015 22:25
-
-
Save asci/72b2f22a62a93f001de3 to your computer and use it in GitHub Desktop.
deployment
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
{ | |
"script" : "bin/www" | |
} |
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
rm -rf node_modules | |
npm i | |
pm2 delete all | |
pm2 start ./scripts/deploy.json --env production |
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
[remote "prod"] | |
url = ssh://[email protected]/path/to/project | |
fetch = +refs/heads/master:refs/remotes/prod/master |
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
#!/bin/sh | |
cd .. | |
GIT_DIR='.git' | |
git reset --hard | |
sh ./scripts/deploy.sh |
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
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