Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit f9a65579 authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

ci: only one pipeline by MR and add a build job

parent 536cb56c
No related branches found
No related tags found
1 merge request!95Resolve "build: update node js and docusaurus to latest LTS"
image: node:18.12.1-slim image: node:18.12.1-slim
stages: stages:
- build
- 🧪 test - 🧪 test
- 📝 publish - 📝 publish
- 🧽 clean - 🧽 clean
...@@ -8,38 +9,53 @@ stages: ...@@ -8,38 +9,53 @@ stages:
variables: variables:
SUB_GROUP: "www" SUB_GROUP: "www"
lint: .cache:
stage: 🧪 test
tags: tags:
- cache - cache
script:
- rm -Rf node_modules
- npm ci
- npm run lint
cache: cache:
policy: push
key: key:
files: files:
- package.json - package-lock.json
paths: paths:
- node_modules - node_modules/
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_MERGE_REQUEST_IID
.cache-push:
extends: .cache
cache:
policy: push
.cache-pull:
extends: .cache
cache:
policy: pull
install_dependencies:
extends: .cache-push
stage: build
script:
- npm ci
rules:
- changes:
- package-lock.json
lint:
extends: .cache-pull
stage: 🧪 test
script:
- npm run lint
pages: pages:
extends: .cache-pull
stage: 📝 publish stage: 📝 publish
tags:
- cache
script: script:
- npm run build - npm run build
- mv build public - mv build public
artifacts: artifacts:
paths: paths:
- public - public
cache:
key:
files:
- package.json
paths:
- node_modules
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
environment: environment:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment