Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
4314388d11 | |||
49e2010f07 | |||
c9bf7c4091 |
@ -3,13 +3,19 @@ var router = express.Router();
|
||||
var exec = require('child_process').exec;
|
||||
/* GET home page. */
|
||||
router.all('/', function(req, res, next) {
|
||||
console.log("some one is here");
|
||||
if(req.headers['x-github-event'] === 'push'){
|
||||
if(req.body.ref === "refs/heads/master"){
|
||||
console.log('time to update master!');
|
||||
console.log("got a push!");
|
||||
if(req.body.ref === "refs/heads/prod"){
|
||||
console.log('time to update prod!');
|
||||
exec('/var/www/gitwrapperdeploy.sh', console.log, console.log);
|
||||
}
|
||||
}
|
||||
res.render('index', { title: 'Express' });
|
||||
});
|
||||
|
||||
router.get('/dbdump', function(req, res, nex){
|
||||
res.sendFile('/var/backups/db/djangodump.json');
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
@ -6,6 +6,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1><%= title %></h1>
|
||||
<p>Welcome to <%= title %></p>
|
||||
<p>YO!! <%= title %></p>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user