-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
47 lines (41 loc) · 1.23 KB
/
.gitlab-ci.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
45
46
47
image: rocker/verse:4.2.2
stages:
- install
- deploy
install_renv:
stage: install
script: echo "Nil to do"
only:
- main
variables:
RENV_CONFIG_REPOS_OVERRIDE: "http://cran.r-project.org"
RENV_PATHS_CACHE: ${CI_PROJECT_DIR}/cache
RENV_PATHS_LIBRARY: ${CI_PROJECT_DIR}/renv/library
cache:
key: one-key-to-rule-them-all
paths:
- ${RENV_PATHS_CACHE}
- ${RENV_PATHS_LIBRARY}
before_script:
- Rscript -e "if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv')"
- Rscript -e "renv::restore()"
pages:
stage: deploy
dependencies:
- install_renv
script:
- Rscript -e 'devtools::install_local(".")'
- Rscript -e 'ourproj::ourproj_start(directory = "temp", project_name = "ourproj", project_title = "Example Project", git_username = "rmgpanw", github_gitlab = "github")'
- git init
- git config user.email "[email protected]"
- git config user.name "rmgpanw"
- git add temp/.
- git commit -m "initial commit"
- Rscript -e 'targets::tar_make(script = "temp/_targets.R", store = "temp/_targets")'
- cp -r public ../public
artifacts:
paths:
- public
expire_in: never
only:
- main