Skip to content

Commit

Permalink
only build docs for installed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Aug 15, 2023
1 parent 4795017 commit 48d463e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ci/scripts/docs_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ main() {
for desc_file in $(find "${source_dir}/r" -name DESCRIPTION); do
local pkg=$(dirname "$desc_file")
local pkg_name=$(basename $pkg)
R -e "pkgdown::build_site_github_pages(pkg = '$pkg', dest_dir = '$source_dir/docs/build/html/r/$pkg_name')"
# Only build R documentation for installed packages (e.g., so that
# Python's documentation build can run without installing the R
# packages). Packages are installed in ci/scripts/r_build.sh
if Rscript -e "requireNamespace('$pkg')"; then
R -e "pkgdown::build_site_github_pages(pkg = '$pkg', dest_dir = '$source_dir/docs/build/html/r/$pkg_name')"
fi
done

}
Expand Down

0 comments on commit 48d463e

Please sign in to comment.