diff --git a/Jenkinsfile b/Jenkinsfile index 2a25440125..5618b760af 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,17 +35,24 @@ stage("Unit Test") { ws('workspace/gluon-nlp-docs') { checkout scm if (env.BRANCH_NAME.startsWith("PR-")) { - sh("ci/step_documentation.sh false") + sh("ci/step_documentation.sh false false") bucket = 'gluon-nlp-staging' path = env.BRANCH_NAME+'/'+env.BUILD_NUMBER } else { - sh("ci/step_documentation.sh true") + sh("ci/step_documentation.sh false true") bucket = 'gluon-nlp' path = env.BRANCH_NAME } sh("ci/upload_doc.sh ${bucket} ${path}") } } + }, + // Make sure documentation can be built without building notebooks + 'Documentation (dev setup)': { + node { + sh("ci/step_documentation.sh true false") + } + } } } diff --git a/Makefile b/Makefile index 51d09c28d2..8d29382b34 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,9 @@ lint: make pylint make restruc +dev_docs: + make -C docs html + docs: release make -C docs doctest html SPHINXOPTS=-W for f in $(shell find docs/examples -type f -name '*.md' -print) ; do \ diff --git a/ci/step_documentation.sh b/ci/step_documentation.sh index 8bbce02899..f7807b3085 100755 --- a/ci/step_documentation.sh +++ b/ci/step_documentation.sh @@ -5,9 +5,14 @@ source ci/prepare_clean_env.sh doc ci/install_dep.sh export CUDA_VISIBLE_DEVICES=$EXECUTOR_NUMBER make clean_doc -make docs +dev=$1 +if [[ $dev == true ]]; then + make dev_docs +else + make docs +fi; -enforce_linkcheck=$1 +enforce_linkcheck=$2 if [[ $enforce_linkcheck == true ]]; then make -C docs linkcheck SPHINXOPTS=-W else