fix: deploy script — write .commit-ref after rsync, not before
The rsync step was overwriting the freshly written .commit-ref with
the stale local copy. Move the write to after rsync and exclude
.commit-ref from the system/ sync so the remote-generated ref persists.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>