Skip to content

Commit 9f7bef0

Browse files
committed
chewb live
1 parent ef466e0 commit 9f7bef0

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

routes.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ module.exports = function(github) {
1313
});
1414
}
1515

16+
github.on('chewb-live:refs/heads/master', function(data) {
17+
_exec('chewb-live')
18+
})
19+
1620
github.on('chewb-cron:refs/heads/master', function(data) {
1721
_exec('chewb-cron')
1822
})

sh/chewb-live.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
REPO='[email protected]:jacobjobelie/chewb-live.git';
4+
RELEASE="/home/samradelie/www/rad/";
5+
6+
# Fetch Latest Code
7+
pm2 stop chewb-live
8+
pm2 delete chewb-live
9+
if [ -d "$RELEASE" ]; then
10+
cd $RELEASE
11+
git pull origin master
12+
else
13+
git clone -b master $REPO $RELEASE;
14+
fi
15+
cd $RELEASE
16+
npm i
17+
pm2 start index.js --name chewb-live -f

0 commit comments

Comments
 (0)