mirror of
https://github.com/status-im/status-site-legacy.git
synced 2025-01-13 17:15:00 +00:00
fix npm install exec
This commit is contained in:
parent
5c22ac61e8
commit
1c741273c4
@ -1,19 +1,9 @@
|
||||
<?php
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(0);
|
||||
$command = "cd /var/www/status-site && git reset --hard HEAD && git pull origin master && npm install && gulp build 2>&1";
|
||||
|
||||
// TODO check against ip or secret hash
|
||||
$log_file = "/var/www/status-site/build.log";
|
||||
if ( $_SERVER['HTTP_X_GITHUB_EVENT'] == 'push' ) {
|
||||
|
||||
if( ($fp = popen($command, "r")) ) {
|
||||
//while( !feof($fp) ){
|
||||
// $result = fread($fp, 1024);
|
||||
file_put_contents($log_file, $fp, FILE_APPEND);
|
||||
//echo $result;
|
||||
//flush();
|
||||
//}
|
||||
fclose($fp);
|
||||
}
|
||||
shell_exec("sudo /var/www/status-site/deploy.sh");
|
||||
echo file_get_contents("/var/www/status-site/build.log");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user