This commit is contained in:
William Mantly 2016-07-08 16:26:32 -04:00
parent b58deaaa86
commit c9bf7c4091
2 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,9 @@ var router = express.Router();
var exec = require('child_process').exec; var exec = require('child_process').exec;
/* GET home page. */ /* GET home page. */
router.all('/', function(req, res, next) { router.all('/', function(req, res, next) {
console.log("some one is here");
if(req.headers['x-github-event'] === 'push'){ if(req.headers['x-github-event'] === 'push'){
console.log("got a push!");
if(req.body.ref === "refs/heads/master"){ if(req.body.ref === "refs/heads/master"){
console.log('time to update master!'); console.log('time to update master!');
exec('/var/www/gitwrapperdeploy.sh', console.log, console.log); exec('/var/www/gitwrapperdeploy.sh', console.log, console.log);

View File

@ -6,6 +6,6 @@
</head> </head>
<body> <body>
<h1><%= title %></h1> <h1><%= title %></h1>
<p>Welcome to <%= title %></p> <p>YO!! <%= title %></p>
</body> </body>
</html> </html>