Add node_modules caching to build
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
021dfe0e3e
commit
c471bee62f
31
.drone.yml
31
.drone.yml
@ -1,6 +1,22 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
type: docker
|
||||
steps:
|
||||
# ============ RESTORE CACHE =============
|
||||
- name: restore node_modules cache
|
||||
image: appleboy/drone-sftp-cache
|
||||
server:
|
||||
from_secret: cache_server
|
||||
port: 22
|
||||
username:
|
||||
from_secret: cache_server_user
|
||||
key:
|
||||
from_secret: cache_server_key
|
||||
path: /var/cache/noded-frontend-node_modules
|
||||
restore: true
|
||||
mount:
|
||||
- node_modules
|
||||
|
||||
# ============ BUILD STEPS ===============
|
||||
- name: build-prod
|
||||
image: node:14
|
||||
@ -11,6 +27,21 @@ steps:
|
||||
- ./node_modules/.bin/ngsw-config ./www/ ./ngsw-config.json /i
|
||||
- tar czf build.tar.gz www
|
||||
|
||||
# =============== REBULD CACHE ==============
|
||||
- name: rebuild node_modules cache
|
||||
image: appleboy/drone-sftp-cache
|
||||
server:
|
||||
from_secret: cache_server
|
||||
port: 22
|
||||
username:
|
||||
from_secret: cache_server_user
|
||||
key:
|
||||
from_secret: cache_server_key
|
||||
path: /var/cache/noded-frontend-node_modules
|
||||
rebuild: true
|
||||
mount:
|
||||
- node_modules
|
||||
|
||||
# =============== RELEASE ===============
|
||||
- name: release
|
||||
image: plugins/gitea-release
|
||||
|
Loading…
Reference in New Issue
Block a user