Commit 823a8259 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Améliore la CI.

parent fa45e350
......@@ -10,6 +10,8 @@ stages:
lint:
stage: test
variables:
NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.npm"
before_script:
- node --version
- npm --version
......@@ -17,17 +19,23 @@ lint:
script:
- npm run lint
artifacts:
name: "node_modules"
expires: 1 day
path:
name: node_modules
expire_in: 1 day
paths:
- node_modules/
cache:
key: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
paths:
- "$NPM_CONFIG_CACHE"
pages:
stage: deploy
needs: [node_modules]
rules:
- if: $CI_COMMIT_BRANCH == "master"
script:
- npm run build
artifacts:
name: "public"
path:
name: pages
paths:
- public/
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