tic.R

add_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 (Sys.getenv("TRAVIS_R_VERSION_STRING") == "release" &&
      Sys.getenv("TRAVIS_OS_NAME") == "linux"  ) {
    get_stage("after_success") %>%
    add_step(covr::codecov())

    get_stage("deploy") %>%
    add_step(step_build_pkgdown()) %>%
    add_step(step_push_deploy(path = "docs", branch = "gh-pages"))
  }
}
daqana/dqsample documentation built on May 7, 2019, 2:30 p.m.