travis: Publish sphinx docs to Github pages
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Thu, 6 Jun 2019 05:49:08 +0000 (15:49 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Fri, 7 Jun 2019 03:13:08 +0000 (13:13 +1000)
Use Travis to build and publish the Sphinx docs automatically.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
.travis.yml
doc/conf.py

index cff60dceddc25874f9a48cda27e7efaeeb0f2375..52566286b7fe69887870fe41ae7ab049613370b0 100644 (file)
@@ -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"
index 2403c1dbd16bb38615e2b150372aa97ad0cb453e..ecef30433a13a022edd583e1eaa5b57ebffac5c0 100644 (file)
@@ -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']