Three fixes so a plain './deploy.sh' really does ship the latest code:
- Diverged branch: rebase local commits onto origin/main instead of
dying on 'Fast-forward to origin/main failed'. Conflicts abort the
rebase and stop the deploy rather than building a half-merged tree.
- Unreachable origin: retry the fetch through the local mihomo proxy
(HERMES_UI_GIT_PROXY, default http://127.0.0.1:7890).
- Self-kill on restart: when the script runs inside the service's own
cgroup, 'systemctl restart' SIGTERMs the script too, so the build
landed but the post-restart health checks never ran. Re-execute under
a transient systemd scope to escape the cgroup first.