diff --git a/.gitignore b/.gitignore index 75e7215a7878..8e09e0c149f3 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ nosetests.xml # Built documentation docs/_build +docs/_build_rtd # Virtual environment env/ diff --git a/tox.ini b/tox.ini index 5ce81b771751..91a3227b0963 100644 --- a/tox.ini +++ b/tox.ini @@ -42,6 +42,16 @@ deps = Sphinx passenv = {[testenv:system-tests]passenv} SPHINX_RELEASE READTHEDOCS LOCAL_RTD +[testenv:docs-rtd] +setenv = + LOCAL_RTD = True +basepython = {[testenv:docs]basepython} +commands = + python -c "import shutil; shutil.rmtree('docs/_build_rtd', ignore_errors=True)" + sphinx-build -W -b html -d docs/_build_rtd/doctrees docs docs/_build_rtd/html +deps = {[testenv:docs]deps} +passenv = {[testenv:docs]passenv} + [pep8] exclude = gcloud/datastore/_datastore_v1_pb2.py,docs/conf.py verbose = 1