No description
| source | ||
| .gitignore | ||
| devenv.lock | ||
| devenv.nix | ||
| devenv.yaml | ||
| doc.txt | ||
| Makefile | ||
| README.md | ||
| requirements.txt | ||
generate
make html
view
xdg-open build/html/index.html
post-receive-hook
#!/bin/bash -e
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ "master" = "$branch" ]; then
echo "$branch branch - will update site"
GIT_FOLDER=$(pwd)
WEB_FOLDER=/var/www/docs
WORKING_FOLDER=$(mktemp -d)
cd $WORKING_FOLDER
echo Cloning
git clone -q $GIT_FOLDER .
echo Setting up Sphinx
python -m venv venv
. venv/bin/activate
pip install --disable-pip-version-check -q -r requirements.txt
echo Building
sphinx-build -q -j auto source build
echo Copying
rm -rf $WEB_FOLDER/*
mv build/* $WEB_FOLDER
echo Cleaning up
cd - > /dev/null
rm -rf $WORKING_FOLDER
echo Done.
else
echo "$branch branch - will NOT update site"
fi
done