#25
Some checks failed
/ ls (pull_request) Successful in 33s
/ ls (push) Successful in 33s
/ ls (release) Failing after 16s

This commit is contained in:
Jonas 2024-06-30 10:18:24 +02:00
parent 70041d7357
commit 55d18fffd1
Signed by: lubiana
SSH key fingerprint: SHA256:gkqM8DUX4Blf6P52fycW8ISTd+4eAHH+Uzu9iyc8hAM

View file

@ -34,6 +34,10 @@ jobs:
ssh-keyscan -H $HOST >> ~/.ssh/known_hosts
# stop services
ssh ${USERNAME}@${HOST} systemctl --user stop pod-futtern
# backup database
ssh ${USERNAME}@${HOST} cp ${TARGETDIR}/app/var/data.db ${TARGETDIR}/backup/data.db-$(date +"%Y%m%d%H%M%S")
# only keep last 10 backupts
ssh ${USERNAME}@${HOST} ls -1tr ${TARGETDIR}/backup/ | head -n -10 | xargs -d '\n' rm -f --
# SCP files to the remote host
rsync -avz --delete deploy/ ${USERNAME}@${HOST}:${TARGETDIR} --exclude=var
# run update script