diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 03585ec..0594000 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -24,13 +24,23 @@ jobs: DEPLOY_KNOWN_HOSTS: ${{ secrets.DEPLOY_KNOWN_HOSTS }} steps: - - name: Code auschecken - uses: actions/checkout@v4 - - - name: Werkzeuge installieren + # Bewusst kein actions/checkout: die JS-Aktion stirbt im Runner-Image + # von Gitea 1.27 beim Aufruf von git mit "read ENOTCONN" (Node-24-Fehler + # im Container). Ein Klon per Shell umgeht das und braucht kein Node. + - name: Werkzeuge und Code holen + env: + TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | apt-get update -qq - apt-get install -y -qq rsync openssh-client + apt-get install -y -qq git rsync openssh-client curl + + rm -rf quelle && mkdir quelle && cd quelle + git init -q + git remote add origin "https://x-access-token:$TOKEN@${GITHUB_SERVER_URL#https://}/$GITHUB_REPOSITORY.git" + # Nach SHA, falls der Server das nicht erlaubt ersatzweise nach Branch. + git fetch -q --depth 1 origin "$GITHUB_SHA" || git fetch -q --depth 1 origin "$GITHUB_REF_NAME" + git checkout -q FETCH_HEAD + echo "Ausgecheckt: $(git log --oneline -1)" - name: Konfiguration pruefen run: | @@ -63,7 +73,7 @@ jobs: --exclude='.env' --exclude='.env.*' \ --exclude='data/' --exclude='node_modules/' \ -e 'ssh -o BatchMode=yes' \ - ./ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/" | tee uebertragen.txt + quelle/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/" | tee uebertragen.txt - name: Abhaengigkeiten, Neustart und Health-Check run: |