A couple years ago, I was designing an XML schema. The document was a mix of the formal schema and English prose explaining each element. I used a pre-commit hook that extracted the RelaxNG schema and confirmed that it was well-formed, which helped me avoid committing invalid versions of the document.
On the server side, I have a post-receive hook in the repo for a website. When I push to 'develop' it runs the static generation script and deploys to my local server as a preview. When I push to 'master' it builds and pushes to production.