From fae0848283b1e2dd6b5ded60d22628b336c5c18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Fri, 11 Sep 2020 15:12:38 +0700 Subject: [PATCH] Follow up on GH-116 * Include docs in source distributions * Prevent docs deploy job from failing when there's nothing to commit --- .github/workflows/docs.yml | 16 ++++++++-------- MANIFEST.in | 3 +++ docs/source/conf.py | 2 +- .../{_templates => templates}/quicknav.html | 0 4 files changed, 12 insertions(+), 9 deletions(-) rename docs/source/{_templates => templates}/quicknav.html (100%) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1065928..ffa6d5a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,12 +4,10 @@ on: push: branches: - master - paths-ignore: - - examples/** - - tests/** - - LICENSE - - README.md - - .*.yml + paths: + - .github/workflows/* + - docs/** + - src/** jobs: docs: @@ -62,5 +60,7 @@ jobs: rm -r docs git add . - git commit -m "Build at $(date --iso-8601=seconds)" - git push origin gh-pages + if git commit -m "Build at $(date --iso-8601=seconds)" + then + git push origin gh-pages + fi diff --git a/MANIFEST.in b/MANIFEST.in index 31c432c..53b2463 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,9 @@ include CMakeLists.txt recursive-include src *.h *.pxd *.pyx +graft docs +prune docs/build + include tox.ini recursive-include tests *.py recursive-include examples *.py diff --git a/docs/source/conf.py b/docs/source/conf.py index f1203ba..d2e1bc5 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -19,7 +19,7 @@ napoleon_google_docstring = False default_role = 'py:obj' # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ['templates'] # List of patterns, relative to source directory, that match # files and directories to ignore when looking for source files. diff --git a/docs/source/_templates/quicknav.html b/docs/source/templates/quicknav.html similarity index 100% rename from docs/source/_templates/quicknav.html rename to docs/source/templates/quicknav.html