Overview
This document records the automation flow used to handle GitHub deployment failures through Hermes. The workflow is:- GitHub emits a deployment failure or workflow failure event.
- Cloudflare Tunnel exposes the local Hermes webhook listener to the public Internet.
- Hermes receives the webhook and matches it to a dynamic subscription.
- Hermes loads the
deploy-failed-investigationskill. - The skill investigates the failure, attempts a local fix, and reports findings to Telegram.
- Hermes stops before commit or push and waits for user confirmation.
Goals
- Catch deployment failures from GitHub Actions or deployment events.
- Keep the webhook endpoint publicly reachable.
- Run an investigation workflow automatically.
- Report concise findings to Telegram.
- Avoid committing or pushing until explicitly confirmed.
- Record repeat mistakes in Hermes memory and repository notes.
Components
1. Hermes webhook listener
The webhook platform listens on the local machine, typically on port8644.
Health check:
2. Cloudflare Tunnel
A named Cloudflare tunnel exposes the local listener through a stable public hostname. Current setup:- Tunnel name:
hermes-webhook - Tunnel ID:
4a606722-8ca4-4ac2-8344-62fe6719f84c - Hostname:
gh-webhooks.kokweng.net - Origin:
http://localhost:8644
3. Hermes webhook subscription
Current subscription:- Name:
github-deploy-failed - Event:
workflow_run - Delivery:
telegram - Telegram chat ID:
72815965 - Prompt: Telegram-friendly deployment failure alert
- Skill:
deploy-failed-investigation
4. Investigation skill
Thedeploy-failed-investigation skill is stored at:
- sync
/Users/gremlin/Dev/monorepowithmain - inspect the webhook payload and GitHub logs if needed
- debug and fix the issue locally
- report findings and fixes to Telegram
- pause before commit or push
- record repeat mistakes in Hermes memory and AGENTS.md
Recommended GitHub event
For GitHub Actions workflows:- Use
workflow_runwhen tracking workflow completion or failure
- Use
deployment_statuswhen tracking deployment state transitions
Telegram-friendly prompt
The current prompt is intentionally short:Webhook URL
GitHub should call the public Cloudflare URL, notlocalhost.
localhostworks only on the local machine.- GitHub must use the public hostname.
- If the tunnel changes, GitHub must be updated to the new active endpoint.
Secret rotation note
Recreating a webhook subscription generates a new secret. If the subscription is removed and re-added:- update the GitHub webhook secret
- re-test delivery
- confirm
hermes webhook listshows the new subscription state
Verification
Check subscription
Check local listener
Check public endpoint
530.
Related files
~/.hermes/webhook_subscriptions.json~/.hermes/.cloudflared/config.yml~/.hermes/skills/devops/deploy-failed-investigation/SKILL.md/Users/gremlin/Dev/monorepo/docs/shared/index.mdx/Users/gremlin/Dev/monorepo/docs/docs.json