From 336bd6bf18a09d79b833044a109f5850bfc40456 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 18 Dec 2020 19:37:58 +0000 Subject: [PATCH] [docs] fix R documentation builds (fixes #3655) (#3656) * [docs] fix R documentation builds (fixes #3655) * use RTD config --- .readthedocs.yml | 3 +++ docs/conf.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index fe005bc307a8..8f8250f762bb 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,3 +9,6 @@ sphinx: builder: html configuration: docs/conf.py fail_on_warning: true +submodules: + include: all + recursive: true diff --git a/docs/conf.py b/docs/conf.py index c84ad222f432..aa1cb2dc3610 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -249,9 +249,9 @@ def generate_r_docs(app): export TAR=/bin/tar cd {0} export R_LIBS="$CONDA_PREFIX/lib/R/library" - Rscript build_r.R + Rscript build_r.R || exit -1 cd {1} - Rscript -e "roxygen2::roxygenize(load = 'installed')" + Rscript -e "roxygen2::roxygenize(load = 'installed')" || exit -1 Rscript -e "pkgdown::build_site( \ lazy = FALSE \ , install = FALSE \ @@ -261,8 +261,8 @@ def generate_r_docs(app): , seed = 42L \ , preview = FALSE \ , new_process = TRUE \ - ) \ - " + ) + " || exit -1 cd {0} """.format(os.path.join(CURR_PATH, os.path.pardir), os.path.join(CURR_PATH, os.path.pardir, "lightgbm_r")) try: