# systemd unit for the docs auto-deploy poller (agent host). # # docs-deploy-poll.service ALWAYS ON. Polls Gitea every 60s; deploys on # any change to main. Works with the agent # host's current firewall (outbound only). # # docs-deploy-webhook.service INSTALLED, INACTIVE UNTIL THE PORT IS OPEN. # Instant push -> deploy once the Infomaniak # panel allows inbound TCP to the agent host # (the Gitea webhook is already registered). # # Install: # sudo cp publishing/docs-deploy-poll.service /etc/systemd/system/ # sudo systemctl daemon-reload # sudo systemctl enable --now docs-deploy-poll # # poll-watcher.sh itself needs NO manual copy: the service runs the copy in # the dedicated checkout (/home/ubuntu/.docs-publisher), which git pull keeps # at main on every deploy, and the watcher re-execs itself when a deploy # changed it. # # ONE BUILD ENVIRONMENT: the poller builds from its own dedicated checkout # (uncommitted edits in a working clone must never block or leak into a # deploy) but with the ONE canonical venv, DOCS_CANONICAL_DIR/.venv-docs, and # drift-checks its publishing/ tree against the canonical checkout before # every build. See publishing/README.md. [Unit] Description=Inference docs: poll Gitea main and deploy to Surfer After=network-online.target Wants=network-online.target [Service] User=ubuntu WorkingDirectory=/home/ubuntu/.docs-publisher Environment=DOCS_REPO_DIR=/home/ubuntu/.docs-publisher Environment=DOCS_CANONICAL_DIR=/home/ubuntu/repos/docs ExecStart=/bin/bash /home/ubuntu/.docs-publisher/publishing/poll-watcher.sh Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target