forked from r-spatialecology/landscapemetrics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tic.R
28 lines (24 loc) · 1.19 KB
/
tic.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
do_package_checks()
if (Sys.getenv("id_rsa") != "") {
# pkgdown documentation can be built optionally. Other example criteria:
# - `inherits(ci(), "TravisCI")`: Only for Travis CI
# - `ci()$is_tag()`: Only for tags, not for branches
# - `Sys.getenv("BUILD_PKGDOWN") != ""`: If the env var "BUILD_PKGDOWN" is set
# - `Sys.getenv("TRAVIS_EVENT_TYPE") == "cron"`: Only for Travis cron jobs
get_stage("before_deploy") %>%
add_step(step_setup_ssh())
if (ci()$get_branch() == "master") {
get_stage("deploy") %>%
add_code_step(remotes::install_github("thomasp85/patchwork")) %>%
add_code_step(remotes::install_github("ropensci/landscapetools")) %>%
# add_code_step(rmarkdown::render("README.Rmd")) %>%
# add_step(step_push_deploy(commit_paths = "README.md", branch = "master")) %>%
add_code_step(devtools::document()) %>%
add_step(step_push_deploy(commit_paths = c("man/", "DESCRIPTION", "NAMESPACE", branch = "master"))) %>%
add_code_step(pkgdown::build_favicons()) %>%
add_step(step_build_pkgdown()) %>%
add_step(step_push_deploy("docs", "gh-pages"))
}
get_stage("after_success") %>%
step_run_code(covr::codecov(quiet = FALSE))
}