This is a post-update hook (took it from here), I've set in the bare repository on a server. It deploys the entire repository to the path at GIT_WORK_TREE
:
#!/bin/sh
export GIT_WORK_TREE=/path/to/you/live/files
git checkout -f
How to setup a post-update hook in Git in order to deploy only the dist/ folder of the repository?