Recently, we switched to using Jekyll for our WnCC website.
This post will essentially help to configure
post-receive hooks on your local repository.
Using git hooks you no longer need to manually deploy the website on your server. Everytime you push to git, a remote server handles the deployment.
Setting up the post-receive hook is done as follows:
Next, add the following lines to
hooks/post-receive and be sure
Jekyll is installed on the server:
Finally, run the following command on any users laptop that needs to be able to deploy using this hook:
Everytime you push, make sure you push it to remote server as well
In case, you wish multiple users to be able to deploy
You need to run the following command on the other laptops:
Ofcourse goes without saying, each user should deploy to remote server using:
In case you are maintaining the repository on github as well, make sure to sync the repositories.
git push could look as follows: