diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7fcf889..41b51c2 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -49,8 +49,8 @@ jobs: - name: Deploy with rsync run: | - sudo mkdir -p /var/www/html/${{ steps.package-version.outputs.current-version}} - rsync -avz ./build/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/html/${{ steps.package-version.outputs.current-version}} + TARGET_DIR="/var/www/html/${{ steps.package-version.outputs.current-version}}" + rsync -a --rsync-path="mkdir -p && rsync" ./build/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:$TARGET_DIR - name: Update symlink run: sudo ln -sf /var/www/html/${{ steps.package-version.outputs.current-version}} /var/www/html/latest