From cd95d81c16bd7f312214e2800bf0600f96f9307c Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Thu, 6 Jun 2019 15:49:08 +1000 Subject: [PATCH] travis: Publish sphinx docs to Github pages Use Travis to build and publish the Sphinx docs automatically. Signed-off-by: Samuel Mendoza-Jonas --- .travis.yml | 18 ++++++++++++++++++ doc/conf.py | 3 +-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index cff60dc..5256628 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,29 @@ matrix: include: - os: linux name: "linux" + env: DOCS="true" - os: linux-ppc64le name: "linux-ppc64le" +addons: + apt: + packages: + - python-pip + before_script: - ./docker/build-builder +install: + - "sudo pip install sphinx" script: - ./docker/build-pb --check --verbose --configure-opts "--enable-platform-arm64 --enable-platform-powerpc" + - if [ "$DOCS" == "true" ]; then cd doc/; make html; fi + +deploy: + provider: pages + skip-cleanup: true + github-token: $GITHUB_TOKEN + local_dir: "doc/_build/html" + on: + branch: master + condition: "$DOCS = true" diff --git a/doc/conf.py b/doc/conf.py index 2403c1d..ecef304 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -30,8 +30,7 @@ release = 'v1.10.3' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [ -] +extensions = ['sphinx.ext.githubpages'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -- 2.39.2