-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
44 lines (35 loc) · 1.16 KB
/
.travis.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
env:
global:
- REPO=haoye/portal_ds
sudo: required
warnings_are_errors: false
language: generic
services:
- docker
before_install:
# copy environmental variables to a file
- bash env_copy.sh
# retrieve the docker container from docker hub
- docker pull $REPO
# run the docker container and copy over the files into the container
- docker run --env-file env_file --name portalds -t -d $REPO /bin/bash
- docker exec -i portalds bash -c "rm -fr /portalDS"
- rm env_file
- docker cp ../portalDS portalds:/
script:
# navigate into the directory and run devtools::check on the package
- docker exec -i portalds bash -c "cd portalDS && Rscript -e 'devtools::check()'"
after_success:
# run code coverage, pkgdown, deploy new pkgdown docs
- docker exec -i portalds bash -c "R CMD INSTALL portalDS"
- docker exec -i portalds bash -c "cd portalDS && Rscript -e 'covr::codecov()'"
- docker exec -i portalds bash -c "cd portalDS && Rscript -e 'pkgdown::build_site()'"
- docker cp portalds:/portalDS/docs docs
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_PAT
keep-history: true
local-dir: docs
on:
branch: master