diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 72280f1..1111b22 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -10,6 +10,7 @@ jobs: - name: Install git run: | apk add --no-cache git + which rsync - name: Setup SSH env: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} @@ -25,7 +26,9 @@ jobs: HOST1: ${{ secrets.HOST1 }} USER: ${{ secrets.USER }} run: | + echo "Removing old website..." ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*' + echo "Deploying new website..." rsync -avz --delete \ --exclude '.git*' \ ./ $USER@$HOST1:/var/www/elia.network/html/