Hexo supports github page by default, which is very nice. But when coming to use a local bare git repository is a bit tricky.
Here is the git hook script coming to rescue, {in target bare repo}/hooks/post-receive
:
1 | #!/usr/bin/env bash |
{published repo} is the working git repo that ideally also use for web server root path.
After _config.yml
being properly set up, now I am able to streamline the deploying process without manuall pulling the published repository every single time.
1 | $ hexo g -d |