Add node_modules caching to build
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Garrett Mills 2020-10-28 12:44:37 -05:00
parent 021dfe0e3e
commit c471bee62f
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -1,6 +1,22 @@
kind: pipeline kind: pipeline
name: default name: default
type: docker
steps: 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 =============== # ============ BUILD STEPS ===============
- name: build-prod - name: build-prod
image: node:14 image: node:14
@ -11,6 +27,21 @@ steps:
- ./node_modules/.bin/ngsw-config ./www/ ./ngsw-config.json /i - ./node_modules/.bin/ngsw-config ./www/ ./ngsw-config.json /i
- tar czf build.tar.gz www - 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 =============== # =============== RELEASE ===============
- name: release - name: release
image: plugins/gitea-release image: plugins/gitea-release