language: r
cache: packages
r:
  - oldrel
  - release
  - devel
warnings_are_errors: true
sudo: required
dist: bionic

r_packages:
  - devtools

after_success:
  - Rscript -e 'pkgdown::build_site()'

## based on https://www.datacamp.com/community/tutorials/cd-package-docs-pkgdown-travis
deploy:
  provider: pages
  skip-cleanup: true
  github-token: $GITHUB_PAT
  keep-history: true
  local-dir: docs
  on:
    branch: master
