Gitolite and Nikola, auto deploy

I am trying to test here, if the autodeploying with git and Nikola works. If it does, I will explain how it works. It seems like GIT_DIR and GIT_WORK_TREE play a big role like described here. Basically you should use a solution like this here.

This is how my script (post-hook) now looks like.

#!/bin/bash
echo Building Nikola output directory..
export GIT_DIR="/home/git/repositories/ulno.net.git"
export GIT_WORK_TREE="/home/ulno.net"
cd "$GIT_WORK_TREE"
echo "Checking out new files on server."
git checkout -f
echo "Building html-files.."
nikola build
echo "Making sure all rights are on read-access."
chmod -R a+rx output
echo "Done building Nikola output directory."

Comments