Automate git deployment of hugo websites
How can I autmatically deploy my hugo website, if I push a new commit to my git repo?
Starting situation If you put your bare Git Repos to /srv/git/ and the websites to /srv/www/.
cd /srv mkdir -p git www git/website cd git/website git init –bare cd /srv/www/ git clone /srv/git/website website Create post-receive file To update another git repo from a post-receive hook, both variables GIT_WORK_TREE and GIT_DIR has to be set correctly.