diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 564218d..d403edf 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -67,6 +67,14 @@ jobs: run: | echo "${{ secrets.DEPLOY_KEY }}" > deploy_key chmod 600 ./deploy_key + + # Deleting 'dist' folder on the server if it exists + echo "Checking and deleting 'dist' folder on the server if it exists..." + ssh -i ./deploy_key -o StrictHostKeyChecking=no ${{ steps.dotenv.outputs.SSH_LOGIN }} 'if [ -d "${{ steps.dotenv.outputs.DEPLOYMENT_PATH }}${{ steps.dotenv.outputs.VITE_THEME_PATH }}/dist" ]; then rm -rf ${{ steps.dotenv.outputs.DEPLOYMENT_PATH }}${{ steps.dotenv.outputs.VITE_THEME_PATH }}/dist; fi' + + # Starting rsync operation + echo "Starting rsync operation..." + rsync -chav --delete \ -e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' \ --exclude-from='.git-ftp-ignore' \