Top-level documentation build repo using sphinx
for the DERIVA software
stack. The sphinx
build process can either be run via a "manual" process
or via a docker
image.
Environment variables can be set in the shell environment (or, when
using docker, passed with the -e
switch) to override the GitHub account and branch used to pull/commit/push to the
documentation GitHub Pages repository:
GITHUB_TOKEN
: The GitHub oauth token to use for pull/commit/push operations on thederiva-docs
repo.GITHUB_TAG
: The branch/tag name of thederiva-docs
repo to use for building.GITHUB_USER
: The GitHub username to authenticate for pull/commit/push operations. Note that theGITHUB_TOKEN
environment variable must be a valid access token for the user specified against thederiva-docs
repo.GITHUB_EMAIL
: The email address to use forGITHUB_USER
. It is recommended that this email address match the registered email address for theGITHUB_USER
or undesired commit behavior may occur.
The manual build process only works on Linux or MacOS operating systems.
- Clone this repository.
- Install the
pandoc
dependency for Jupyter Notebook conversion support. Follow the instructions for your platform here. - Install Python dependencies via
pip
using the following command:pip3 install --user -r requirements.txt
- Run:
make -C ./docs-src html
from the cloned repo root directory. - Run:
commit.sh
to update only the built documentation to the live GitHub Pages website (when pushing to master branch only).
The docker container based update requires a properly setup docker environment. Follow the installation instructions for your specific platform here.
Pull the image from Docker Hub using:
docker pull isrddev/deriva-docs
Clone this repository build the image using the following command:
docker build -t isrddev/deriva-docs .
Run the following command on the docker image to automatically build and
publish the documentation as the GitHub user isi-isrd-dev
from the master
deriva-docs
branch.
- Note that in the default usage below, the
GITHUB_TOKEN
environment variable must be a valid token with read/write scopes for the default GitHub userisi-isrd-dev
and thederiva-docs
repo. - The
-e GITHUB_TOKEN=XXX
may be omitted to only build the docs without the subsequent commit/push to GitHub.
docker run -it -e GITHUB_TOKEN=XXX isrddev/deriva-docs build