"vscode:/vscode.git/clone" did not exist on "6d9e7f1796abfe47846cb06abe7b1847fa77ded5"
Unverified Commit bf99a072 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] [docs] replace build_r_site.R with pkgdown::build_site() (#3098)

* [R-package] [docs] replace build_r_site.R with pkgdown::build_site()

* fix paths

* fix continuation

* new_process arg
parent b34387cb
library(pkgdown)
library(roxygen2)
setwd("lightgbm_r")
if (!dir.exists("docs")) {
dir.create("docs")
}
roxygen2::roxygenize(load = "installed")
pkgdown::clean_site()
pkgdown::init_site()
pkgdown::build_home(preview = FALSE, quiet = FALSE)
pkgdown::build_reference(
lazy = FALSE
, devel = FALSE
, examples = TRUE
, run_dont_run = FALSE
, seed = 42L
, preview = FALSE
)
......@@ -240,8 +240,21 @@ def generate_r_docs(app):
cd {0}
export R_LIBS="$CONDA_PREFIX/lib/R/library"
Rscript build_r.R
Rscript build_r_site.R
""".format(os.path.join(CURR_PATH, os.path.pardir))
cd {1}
Rscript -e "roxygen2::roxygenize(load = 'installed')"
Rscript -e "pkgdown::build_site( \
lazy = FALSE \
, install = FALSE \
, devel = FALSE \
, examples = TRUE \
, run_dont_run = FALSE \
, seed = 42L \
, preview = FALSE \
, new_process = TRUE \
) \
"
cd {0}
""".format(os.path.join(CURR_PATH, os.path.pardir), os.path.join(CURR_PATH, os.path.pardir, "lightgbm_r"))
try:
# Warning! The following code can cause buffer overflows on RTD.
# Consider suppressing output completely if RTD project silently fails.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment