1
0
Fork 0
forked from Deuxfleurs/site

Cache node_modules for build

This commit is contained in:
Alex 2021-02-08 16:26:21 +01:00
parent 259af84068
commit 3fc557df8d

View file

@ -2,11 +2,29 @@ kind: pipeline
name: default name: default
steps: steps:
- name: restore-cache
image: meltwater/drone-cache:dev
environment:
AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key
pull: true
settings:
restore: true
bucket: drone-cache
region: garage
mount:
- 'node_modules'
path_style: true
endpoint: https://garage.deuxfleurs.fr
- name: build - name: build
image: node:latest image: node:latest
commands: commands:
- npm install - npm install
- node render.js - node render.js
- name: upload - name: upload
image: plugins/s3 image: plugins/s3
settings: settings:
@ -22,3 +40,19 @@ steps:
endpoint: https://garage.deuxfleurs.fr endpoint: https://garage.deuxfleurs.fr
region: garage region: garage
- name: rebuild-cache
image: meltwater/drone-cache:dev
environment:
AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key
pull: true
settings:
rebuild: true
bucket: drone-cache
region: garage
mount:
- 'node_modules'
path_style: true
endpoint: https://garage.deuxfleurs.fr