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 }}