-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.drone.yml
37 lines (35 loc) · 904 Bytes
/
.drone.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
kind: pipeline
type: docker
name: Update csv to GitHub
steps:
- name: Generate output and push to GitHub
image: rocker/geospatial:4.2.3
volumes:
- name: renv_paths_cache_host
path: /renv/cache
- name: shp_cache
path: /drone/src/data
environment:
RENV_PATHS_CACHE: /renv/cache
RENV_VERSION: 0.17.3
WEBDAV_USERNAME:
from_secret: webdav_username
WEBDAV_PASSWORD:
from_secret: webdav_password
WEBDAV_URL:
from_secret: webdav_url
commands:
- R -e "renv::restore()"
- |
if [ ! -d "/drone/src/data/village_shp" ]; then
Rscript R/utils/village_shp_downloader.R
fi
- Rscript run_all.R
- curl -u "$WEBDAV_USERNAME:$WEBDAV_PASSWORD" -T output/village.csv "$WEBDAV_URL/data.csv"
volumes:
- name: renv_paths_cache_host
host:
path: /opt/local/renv/cache
- name: shp_cache
host:
path: /opt/local/commusidewalk-data/cache