Add node_modules caching to build
continuous-integration/drone/push Build is failing Details

master
Garrett Mills 4 years ago
parent 021dfe0e3e
commit c471bee62f
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -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…
Cancel
Save