I currently update a website by pushing the git repository to a remote. The remote then has a post-receive hook which does
GIT_WORK_TREE=/var/www/html/ git checkout -f
I recently added a submodule in my repository from a different project. I would like to pull from this submodule post-receive.
.gitmodule
[submodule "plugins"]
path = plugins
url = https://github.com/getpelican/pelican-plugins.git
(yes it's a pelican website, but that's irrelevant)
I imagine it's a matter of adding a git pull
in the right place in the post-receive hook, but I'm not sure exactly where or how.