V2: Git Webhooks

I use Caddy V1 to host sites that are automatically pulled via the git middleware in Caddy V1.
Is there a git plugin equivalent for Caddy V2?

Yes there is!

It only supports JSON config for now, due to some limitations in the Caddyfile adapter currently, but Caddyfile support should come eventually.

1 Like

I also did not find git middleware with Caddyfile support, but I found that exec can meet my requirements. When you have git committed, you can inform the route, and then execute the corresponding script, which can do anything (including pulling git, and generating site).

example: caddy-v2/hugo

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.