fix: always print log on build err
Some checks failed
Rebuild signaller for deprived.dev to rebuild site / signal_rebuild (push) Failing after 5s
Some checks failed
Rebuild signaller for deprived.dev to rebuild site / signal_rebuild (push) Failing after 5s
This commit is contained in:
parent
a74ff91ebe
commit
e5cccd17cb
1 changed files with 3 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ name: Rebuild signaller for deprived.dev to rebuild site
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
test_service:
|
||||
signal_rebuild:
|
||||
runs-on: native
|
||||
|
||||
steps:
|
||||
|
|
@ -13,11 +13,12 @@ jobs:
|
|||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
|
||||
run: |
|
||||
function dumplog() { echo "Build Log: $(ssh -i $sshkey $sshargs deprivedbuilder@deprived.dev "cat ~/latest_build.log")"; }
|
||||
sshkey=$(mktemp)
|
||||
trap "rm -rf $sshkey" exit
|
||||
trap dumplog exit
|
||||
echo -e $SSH_PRIVATE_KEY > $sshkey
|
||||
service="build-deprived-website-$BRANCH"
|
||||
sshargs="-o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||
echo "Starting systemd oneshot service: $service"
|
||||
ssh -i $sshkey -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no deprivedbuilder@deprived.dev -t "sudo /run/current-system/sw/bin/systemctl start $service"
|
||||
echo "Build Log: $(ssh -i $sshkey $sshargs deprivedbuilder@deprived.dev "cat ~/latest_build.log")"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue