I have a GitLab Pages site that uses Gulp to build. My .gitlab-ci.yml file looks something like this:
image: node:latest
before_script:
- npm install gulp-cli -g
- npm install gulp [...and a whole bunch of packages] --save-dev
build:
stage: build
script:
- gulp buildsite
artifacts:
paths:
- public
pages:
stage: deploy
script:
- gulp
artifacts:
paths:
- public
cache:
paths:
- node_modules/
Before tasks buildand pagescommands are executed npm install(once before each task). Since I have quite a few packages, this usually takes a while.
Is there a way to make installations only once in the entire assembly?
I thought I cacheshould have helped with, but it still seems like it is still rebooting everything.
source
share