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