Add cache to drone config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a49603e539
commit
127e6994e1
30
.drone.yml
30
.drone.yml
@ -2,8 +2,21 @@ kind: pipeline
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: restore-cache
|
||||||
|
image: meltwater/drone-cache:dev
|
||||||
|
settings:
|
||||||
|
pull: true
|
||||||
|
backend: "filesystem"
|
||||||
|
restore: true
|
||||||
|
archive_format: "gzip"
|
||||||
|
cache_key: "volume"
|
||||||
|
mount:
|
||||||
|
- "node_modules"
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /tmp/cache
|
||||||
- name: build
|
- name: build
|
||||||
image: node:20
|
image: node:20-slim
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
@ -20,3 +33,18 @@ steps:
|
|||||||
from_secret: rsync_user
|
from_secret: rsync_user
|
||||||
key:
|
key:
|
||||||
from_secret: rsync_key
|
from_secret: rsync_key
|
||||||
|
args:
|
||||||
|
- --delete
|
||||||
|
- name: rebuild-cache
|
||||||
|
image: meltwater/drone-cache
|
||||||
|
settings:
|
||||||
|
pull: true
|
||||||
|
rebuild: true
|
||||||
|
cache_key: "volume"
|
||||||
|
mount:
|
||||||
|
- "node_modules"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /srv/drone/cache
|
||||||
|
Loading…
Reference in New Issue
Block a user