The poller's private venv (.docs-publisher/.venv-docs) diverged from the
canonical one twice, each time silently delaying a deploy. Consolidate:
- poll-watcher.sh builds with the ONE canonical venv
(~/repos/docs/.venv-docs) while keeping its dedicated checkout (uncommitted
edits in a working clone must never block or leak into a deploy).
- New drift check: publishing/ + mkdocs.yml are compared with the canonical
checkout before every build; a mismatch fails the deploy loudly instead of
shipping logic the canonical source cannot reproduce.
- Pre-deploy gate: build.sh --check-only verifies the pinned toolchain and
every configured plugin (self-heals missing pins, fails loudly naming an
unpinned plugin).
- Alerting: 3 consecutive deploy failures -> marker file + ONE Matrix message
to the InferenceBot HQ room (hourly cap); counter resets on next success.
- The watcher re-execs itself when a deploy changed poll-watcher.sh, so the
running loop always matches the deployed one.
- webhook receiver (dormant) repointed at the canonical venv too; unit files
and README document the layout.
- docs-deploy-poll.service and the receiver now build from
/home/ubuntu/.docs-publisher, so uncommitted edits in a working clone can
never block a deploy
- the poller compares origin/main against the last DEPLOYED commit (state
file), so a push made from the deploy clone itself also triggers a deploy
The agent host's cloud firewall only admits inbound SSH, so the registered
Gitea webhook cannot reach the receiver. docs-deploy-poll.service polls
Gitea every 60s over outbound HTTPS and deploys whenever main moves; the
webhook stays wired for the moment a port is opened in the Infomaniak panel.
Both serialise on the same deploy lock.