stage: setup
cache:
paths:
- - node_modules/
- .yarn-cache/
script:
- - yarn --cache-folder=.yarn-cache
+ - &run_yarn
+ yarn --cache-folder=.yarn-cache --no-progress --pure-lockfile
lint:
stage: verify
- cache:
+ cache: &pull_cache
policy: pull
paths:
- - node_modules/
- script: node_modules/.bin/gulp lint
+ - .yarn-cache/
+ script:
+ - *run_yarn
+ - node_modules/.bin/gulp lint
bundle-stable:
stage: deploy
only:
- master@antora/antora-ui-default
- cache:
- policy: pull
- paths:
- - node_modules/
- script: node_modules/.bin/gulp pack
+ cache: *pull_cache
+ script:
+ - *run_yarn
+ - node_modules/.bin/gulp pack
artifacts:
paths:
- build/ui-bundle.zip
stage: deploy
except:
- master
- cache:
- policy: pull
- paths:
- - node_modules/
- script: node_modules/.bin/gulp pack
+ cache: *pull_cache
+ script:
+ - *run_yarn
+ - node_modules/.bin/gulp pack
artifacts:
- # automatically expire unless marked "keep" from job page
- expire_in: 1 day
+ expire_in: 1 day # unless marked as keep from job page
paths:
- build/ui-bundle.zip
pages:
stage: deploy
only:
- master@antora/antora-ui-default
- cache:
- policy: pull
- paths:
- - node_modules/
+ cache: *pull_cache
script:
+ - *run_yarn
- node_modules/.bin/gulp build:preview
# FIXME figure out a way to avoid copying these files to preview site
- rm -rf public/_/{helpers,layouts,partials}