Root cause: Gitea Actions checks out the merge commit SHA for PR events,
putting git in detached HEAD state. "git push origin HEAD" then creates
a dangling ref instead of updating main.
Fix: use "git push origin HEAD:refs/heads/main" to explicitly target
the main branch.
Also: fail the workflow if .mokogitea/manifest.xml is missing.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>