Try to use environ var to cache Gems

parent c8396099
Pipeline #108 passed with stage
in 2 minutes
...@@ -7,10 +7,10 @@ variables: ...@@ -7,10 +7,10 @@ variables:
JEKYLL_ENV: production JEKYLL_ENV: production
LC_ALL: C.UTF-8 LC_ALL: C.UTF-8
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
BUNDLE_USER_HOME: ./bundle
# Build is in `before_script` because it's the same for both deployments # Build is in `before_script` because it's the same for both deployments
before_script: before_script:
- mv usr-local-bundle /usr/local/bundle || true # Move extracted cache to its original place
- apk add npm - apk add npm
- npm install - npm install
- bundle install - bundle install
...@@ -18,7 +18,6 @@ before_script: ...@@ -18,7 +18,6 @@ before_script:
- jekyll build -d public - jekyll build -d public
- ./scripts/purgecss.sh public - ./scripts/purgecss.sh public
- ./scripts/minifycssjs.sh public - ./scripts/minifycssjs.sh public
- mv /usr/local/bundle usr-local-bundle || true # Move cache to workdir so that GitLab will pick it up
deploy-prod: deploy-prod:
stage: deploy stage: deploy
...@@ -32,7 +31,7 @@ deploy-prod: ...@@ -32,7 +31,7 @@ deploy-prod:
cache: cache:
key: build-deps key: build-deps
paths: paths:
- "usr-local-bundle/" - "bundle/"
- "node_modules/" - "node_modules/"
only: only:
- master - master
...@@ -47,7 +46,7 @@ pages: ...@@ -47,7 +46,7 @@ pages:
cache: cache:
key: build-deps key: build-deps
paths: paths:
- "usr-local-bundle/" - "bundle/"
- "node_modules/" - "node_modules/"
only: only:
- develop - develop
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment