Files
docs/publishing/docs-deploy-poll.service
T
inference-bot 3cc32708d9 docs site: deploy from a dedicated clean clone; poll against last deployed commit
- 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
2026-11-03 19:48:34 +00:00

37 lines
1.5 KiB
Desktop File

# systemd units for the docs deploy automation (agent host).
#
# Two mechanisms, one job — keep https://docs.inference.coop/ in step with
# co-op/docs main:
#
# 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 both:
# sudo cp publishing/poll-watcher.sh publishing/webhook-receiver.py /home/ubuntu/repos/docs/publishing/
# sudo cp publishing/docs-deploy-poll.service publishing/webhook-receiver.service /etc/systemd/system/
# sudo systemctl daemon-reload
# sudo systemctl enable --now docs-deploy-poll
# sudo systemctl enable --now docs-deploy-webhook # when the port is open
[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
ExecStart=/bin/bash /home/ubuntu/.docs-publisher/publishing/poll-watcher.sh
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target