Create hook to auto-write the content of Gitea Repo to file system on post-receive

I’m new to Git hooks/Gitea web hooks and would like a simple way to automatically write specific content of the gitea repository to a location on the server that Gitea is running on.

This event should be triggered every time a user updates the gitea repository .

Can someone point me in the correct direction?

Githooks are available for use in gitea: please see Config Cheat Sheet - Docs (but note security warning before enabling them to ensure you accept the risk).

However, you could use a CI system such as Drone ( to run commands on git push.