From 2358b4dd83d88ea1433d56f10e07cedb790cde81 Mon Sep 17 00:00:00 2001 From: informaticker Date: Sun, 3 Nov 2024 23:29:14 +0100 Subject: [PATCH] fix actions AGAIN --- .gitea/workflows/deploy.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 653964b..92f8a47 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -5,12 +5,13 @@ jobs: deploy: runs-on: ubuntu-latest container: - image: eeacms/rsync + image: alpine steps: - - name: Install git + - name: Install git and openssh run: | - apk add --no-cache git - which rsync + apk add --no-cache git openssh-client + - name: Checkout code + uses: actions/checkout@v3 - name: Setup SSH env: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} @@ -26,12 +27,10 @@ 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..." - /usr/bin/rsync -avz --delete \ - --exclude '.git*' \ - ./ $USER@$HOST1:/var/www/elia.network/html/ + scp -r \ + $(ls -A | grep -v '.git') \ + $USER@$HOST1:/var/www/elia.network/html/ - name: Reload Nginx env: HOST1: ${{ secrets.HOST1 }}