vbrandl.net/.drone.yml
Valentin Brandl 1eb333beee
All checks were successful
the build was successful
Implement build cache
2018-07-20 18:20:57 +02:00

88 lines
1.8 KiB
YAML

pipeline:
restore-cache-dev:
image: drillster/drone-volume-cache
restore: true
mount:
- public
volumes:
- /home/gitea/gitea/drone_build_cache/staging.vbrandl.net:/cache
when:
branch: develop
restore-cache-prod:
image: drillster/drone-volume-cache
restore: true
mount:
- public
volumes:
- /home/gitea/gitea/drone_build_cache/vbrandl.net:/cache
when:
branch: master
build-dev:
image: cbrgm/drone-hugo:latest
buildDrafts: true
buildFuture: true
buildExpired: true
validate: true
url: https://staging.vbrandl.net
when:
branch: develop
build-prod:
image: cbrgm/drone-hugo:latest
buildDrafts: false
buildFuture: false
buildExpired: false
validate: true
url: https://www.vbrandl.net
when:
branch: master
compress:
image: alpine:latest
commands:
- apk --no-cache update
- apk add make
- make -C public/ -f ../Makefile
deploy-dev:
image: drillster/drone-rsync
hosts: [ "vbrandl.net" ]
target: /var/www/staging.vbrandl.net
source: public/*
user: hugo
secrets: [ rsync_key ]
when:
branch: develop
deploy-prod:
image: drillster/drone-rsync
hosts: [ "vbrandl.net" ]
target: /var/www/vbrandl.net
source: public/*
user: hugo
secrets: [ rsync_key ]
when:
branch: master
rebuild-cache-dev:
image: drillster/drone-volume-cache
rebuild: true
mount:
- public
volumes:
- /home/gitea/gitea/drone_build_cache/staging.vbrandl.net:/cache
when:
branch: develop
rebuild-cache-prod:
image: drillster/drone-volume-cache
rebuild: true
mount:
- public
volumes:
- /home/gitea/gitea/drone_build_cache/vbrandl.net:/cache
when:
branch: master