From a754ecf1da7c2324867680d44194bd191eaa7e67 Mon Sep 17 00:00:00 2001 From: informaticker Date: Sun, 3 Nov 2024 23:24:15 +0100 Subject: [PATCH] fix actions AGAIN --- .gitea/workflows/deploy.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 0f581d0..d7cfe69 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -9,8 +9,9 @@ jobs: uses: actions/checkout@v3 - name: Install rsync run: | - apt update - apt-get install rsync -y + sudo apt-get update + sudo apt-get install rsync -y + which rsync # This will verify rsync location - name: Setup SSH env: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} @@ -21,17 +22,16 @@ jobs: echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa ssh-keyscan -H $HOST1 >> ~/.ssh/known_hosts - - name: Deploy to first host env: HOST1: ${{ secrets.HOST1 }} USER: ${{ secrets.USER }} run: | + # First verify the remote directory exists ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*' - rsync -avz --delete \ + /usr/bin/rsync -avz --delete \ --exclude '.git*' \ ./ $USER@$HOST1:/var/www/elia.network/html/ - - name: Reload Nginx env: HOST1: ${{ secrets.HOST1 }}