Skip to content

Commit ef26f40

Browse files
simplify tic, only build pkgdown on one machine
1 parent 0214c06 commit ef26f40

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
- R -q -e 'tic::before_script()'
4141
- name: macOS_conda
4242
os: osx
43+
env:
44+
- BUILD_PKGDOWN='TRUE'
4345
before_script:
4446
- R -q -e 'if (!requireNamespace("reticulate")) install.packages("reticulate"); reticulate::install_miniconda()'
4547
- R -q -e 'tic::before_script()'

tic.R

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@ Sys.setenv(LINTR_COMMENT_BOT = "false")
22
do_package_checks(
33
error_on = ifelse(tic::ci_has_env("EXTERNAL_INSTALLATION"), "warning", "note")
44
)
5-
if (Sys.getenv("id_rsa") != "" && ci()$get_branch() == "master") {
6-
# pkgdown documentation can be built optionally. Other example criteria:
7-
# - `inherits(ci(), "TravisCI")`: Only for Travis CI
8-
# - `ci()$is_tag()`: Only for tags, not for branches
9-
# - `Sys.getenv("BUILD_PKGDOWN") != ""`: If the env var "BUILD_PKGDOWN" is set
10-
# - `Sys.getenv("TRAVIS_EVENT_TYPE") == "cron"`: Only for Travis cron jobs
11-
get_stage("before_deploy") %>%
12-
add_step(step_setup_ssh())
135

14-
get_stage("deploy") %>%
15-
add_step(step_build_pkgdown()) %>%
16-
add_step(step_push_deploy("docs", "gh-pages"))
6+
if (ci_has_env("BUILD_PKGDOWN")) {
7+
do_pkgdown()
178
}

0 commit comments

Comments
 (0)