Deploy jekyll site with git

In the git bare repository of your server add this post-update file:

#!/usr/bin/env zsh
cd /path/to/the/server/git/repo
env -i git pull
env -i git push github master # for github backup (add github to the remote)
/path/to/jekyll build --destination /path/to/your/_site

Now when you push commits, the site is automaticcaly built.

If you want to ask me a question or leave me a message add @bougui505 in your comment.