Add caching to Drone, rejig live / dev

This commit is contained in:
3wc 2023-11-17 13:18:29 +00:00
parent bf3eb82814
commit af6467d17b

View File

@ -2,12 +2,19 @@
kind: pipeline kind: pipeline
name: deploy to washweb.org name: deploy to washweb.org
steps: steps:
- name: restore-cache
image: drillster/drone-volume-cache
restore: true
mount:
- /usr/local/lib/R/site-library
volumes:
- /tmp/cache:/cache
- name: build quarto site - name: build quarto site
image: cynkra/quarto-r:1.4.169-4.3.1 image: cynkra/quarto-r:1.4.169-4.3.1
commands: commands:
- 'echo "install.packages(\"rmarkdown\")" | r -' - 'echo "install.packages(\"rmarkdown\")" | r -'
- quarto render - quarto render
- name: deploy to running app instance - name: deploy to washweb.org
image: git.coopcloud.tech/coop-cloud/docker-cp-deploy:latest image: git.coopcloud.tech/coop-cloud/docker-cp-deploy:latest
settings: settings:
host: washnote.org host: washnote.org
@ -21,16 +28,7 @@ steps:
when: when:
branch: branch:
- main - main
--- - name: deploy to dev.washweb.org
kind: pipeline
name: deploy to dev.washweb.org
steps:
- name: build quarto site
image: cynkra/quarto-r:1.4.169-4.3.1
commands:
- 'echo "install.packages(\"rmarkdown\")" | r -'
- quarto render
- name: deploy to running app instance
image: git.coopcloud.tech/coop-cloud/docker-cp-deploy:latest image: git.coopcloud.tech/coop-cloud/docker-cp-deploy:latest
settings: settings:
host: washnote.org host: washnote.org
@ -44,3 +42,10 @@ steps:
when: when:
branch: branch:
- dev - dev
- name: rebuild-cache
image: drillster/drone-volume-cache
rebuild: true
mount:
- /usr/local/lib/R/site-library
volumes:
- /tmp/cache:/cache