mirror of
https://github.com/standardebooks/web.git
synced 2025-07-05 14:20:29 -04:00
Set GitHub hook to deploy to web on update
This commit is contained in:
parent
033a390341
commit
55cfad42db
1 changed files with 11 additions and 0 deletions
|
@ -91,6 +91,17 @@ try{
|
|||
else{
|
||||
Logger::WriteGithubWebhookLogEntry($requestId, 'git pull from GitHub complete.');
|
||||
}
|
||||
|
||||
// Our local repo is now updated. Build the ebook!
|
||||
exec('/standardebooks.org/scripts/deploy-ebook-to-www ' . escapeshellarg($dir), $output, $returnCode);
|
||||
if($returnCode != 0){
|
||||
Logger::WriteGithubWebhookLogEntry($requestId, 'Error deploying ebook to web. Output: ' . implode("\n", $output));
|
||||
throw new WebhookException('Couldn\'t process ebook.', $post);
|
||||
}
|
||||
else{
|
||||
Logger::WriteGithubWebhookLogEntry($requestId, 'Deploy to web complete.');
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new WebhookException('Unrecognized GitHub webhook event.', $post);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue