From 6d5a65d2df887435f875bfaea03968b187e4be6c Mon Sep 17 00:00:00 2001 From: elias Date: Sun, 30 Aug 2026 16:04:17 +0200 Subject: [PATCH] ci: fix SSH auth root@ correct service name astraos add excludes --- .forgejo/workflows/deploy.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 9950787..88e4e4d 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -11,19 +11,28 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Install rsync + ssh + - name: Install rsync + openssh run: | - apt-get update + apt-get update -qq apt-get install -y rsync openssh-client - - name: Add SSH key + - name: Configure SSH run: | mkdir -p ~/.ssh echo "${{ secrets.DEPLOY_KEY_B64 }}" | base64 -d > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 ssh-keyscan -p 22 116.203.131.247 >> ~/.ssh/known_hosts - - name: Deploy AstraOS folder to server + - name: Sync files to VPS run: | - rsync -av \ - ./AstraOS/ astraos@116.203.131.247:/home/astraos/Astra-OS-Panel/ \ No newline at end of file + rsync -av --delete \ + --exclude='.env' \ + --exclude='venv/' \ + --exclude='__pycache__/' \ + --exclude='*.pyc' \ + --exclude='.git/' \ + ./AstraOS/ root@116.203.131.247:/home/astraos/Astra-OS-Panel/ + + - name: Restart gunicorn service + run: | + ssh root@116.203.131.247 "systemctl restart astraos && systemctl is-active astraos" \ No newline at end of file