add drone-cache in drone CI config
continuous-integration/drone/push Build is passing Details

InkSoul 2024-01-03 16:16:44 +08:00
parent 859e5cbf03
commit 20b620f2fc
1 changed files with 35 additions and 1 deletions

View File

@ -7,6 +7,22 @@ clone:
depth: 1
steps:
- name: restore-cache
image: meltwater/drone-cache
pull: true
settings:
backend: "filesystem"
restore: true
debug: true
cache_key: "volume"
archive_format: "gzip"
mount:
- 'vendor'
volumes:
- name: cache
path: /tmp/cache
- name: build
image: inksoul/hugo-rsync
depends_on: [clone] # 依赖的步骤,
@ -17,7 +33,25 @@ steps:
- hugo
- rsync -a --delete --exclude '.user.ini' public/ /data
- name: rebuild-cache
image: meltwater/drone-cache
pull: true
settings:
backend: "filesystem"
rebuild: true
debug: true
cache_key: "volume"
archive_format: "gzip"
mount:
- 'vendor'
volumes:
- name: cache
path: /tmp/cache
volumes: #声明数据卷
- name: blog
host:
path: /home/ubuntu/myWork/Blog/InkSoul/public
- name: cache
host:
path: /home/ubuntu/myWork/blogCachePath