Skip to content

Commit df61319

Browse files
committed
Only deploy on success
1 parent 334b0b8 commit df61319

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/build_and_deploy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
run: ./book build-all
3232

3333
- name: Deploy
34+
if: success()
3435
uses: appleboy/scp-action@master
3536
with:
3637
host: terminal42.ch

book

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ if (!in_array($command, $commands, true)) {
2121

2222
$runCommand = function (string $command) {
2323
echo $command . "\n";
24-
echo system($command);
24+
echo system($command, $resultCode);
25+
exit($resultCode);
2526
};
2627

2728
$buildBook = function(string $book) use ($runCommand) {

0 commit comments

Comments
 (0)