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"
This commit is part of merge request !95. Comments created here will be created in the context of that merge request.
image: node:18.12.1-slim
stages:
- build
- 🧪 test
- 📝 publish
- 🧽 clean
......@@ -8,38 +9,53 @@ stages:
variables:
SUB_GROUP: "www"
lint:
stage: 🧪 test
.cache:
tags:
- cache
script:
- rm -Rf node_modules
- npm ci
- npm run lint
cache:
policy: push
key:
files:
- package.json
- package-lock.json
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:
extends: .cache-pull
stage: 📝 publish
tags:
- cache
script:
- npm run build
- mv build public
artifacts:
paths:
- public
cache:
key:
files:
- package.json
paths:
- node_modules
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
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