touch $REMOTE_PROGRESS

sshpass -p "${SERVER_PASSWORD}" \
    rsync -avzu \
    `# Version control and editor files` \
    --exclude .vscode \
    --exclude .DS_Store \
    `# Dependencies` \
    --exclude node_modules \
    --exclude vendor \
    `# Dynamic content directories` \
    --exclude storage \
    --exclude uploads \
    --exclude temp \
    --exclude cache \
    --exclude sitepress-multilingual-cms \
    `# Claudshit AI shit` \
    --exclude ".claude" \
    --exclude ".playwright-mcp" \
    `# Project scripts` \
    --exclude "lazygit" \
    --exclude ssh.sh \
    --exclude remote-local.sh \
    --exclude local-remote.sh \
    --exclude .build-cache \
    --exclude watch-build.sh \
    --exclude sftp-watch.sh \
    --exclude split-conflicts.sh \
    --exclude $REMOTE_PROGRESS \
    -e ssh "${SERVER_USER}@${SERVER_HOST}:${SERVER_PATH}" . \
    $1

rm $REMOTE_PROGRESS
