diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 79174b6..ef4fbdb 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -12,10 +12,32 @@ jobs: steps: - name: Deploy on server run: | - set -e + set -euxo pipefail + + test -d /opt/noctura/newsbot || { + echo "Deploy-Verzeichnis fehlt: /opt/noctura/newsbot" + exit 1 + } cd /opt/noctura/newsbot + test -d .git || { + echo "Kein Git-Repository in /opt/noctura/newsbot" + exit 1 + } + + command -v git >/dev/null || { + echo "git ist auf dem Runner nicht installiert" + exit 1 + } + + command -v docker >/dev/null || { + echo "docker ist auf dem Runner nicht installiert" + exit 1 + } + + docker compose version + git fetch origin git reset --hard origin/main