diff --git a/.ci/docs.jenkinsfile b/.ci/docs.jenkinsfile index f6984debe5..197343e055 100644 --- a/.ci/docs.jenkinsfile +++ b/.ci/docs.jenkinsfile @@ -5,7 +5,14 @@ pipeline { stages { stage('build') { steps { - sh 'make -C Documentation html SPHINXOPTS="-W"' + sh ''' + cd Documentation + git tag vTEST-FOR-DOCS-PIPELINE + READTHEDOCS=1 READTHEDOCS_VERSION=stable make html SPHINXOPTS="-W"' + make clean + git tag -d vTEST-FOR-DOCS-PIPELINE + make html SPHINXOPTS="-W"' + ''' } } } diff --git a/Documentation/conf.py b/Documentation/conf.py index 8356a00e47..cc00ed1eaf 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -89,10 +89,10 @@ elif rtd_current_version == 'stable': # we don't have a version, we may be able to check from git try: - tags = [tag for tag in subprocess.check_output( + git_tags = [tag for tag in subprocess.check_output( ['git', 'tag', '--points-at']).decode().strip().split() if tag.startswith('v')] - rst_stable_checkout = f'--branch {tags.pop()}' + rst_stable_checkout = f'--branch {git_tags.pop()}' except (subprocess.CalledProcessError, IndexError): pass