Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
image: node:lts-slim
stages:
- test
- build
- deploy
variables:
NPM_ORGANIZATION: lydra
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
before_script:
- npm ci
pages:
stage: build
script:
- npm run build
- mv public public.dist
- mv dist public
artifacts:
paths:
- public
publish_gitlab_registry:
stage: deploy
needs:
- job: pages
artifacts: true
dependencies:
- pages
script:
- npm config set ${NPM_ORGANIZATION}:registry //lab.frogg.it/api/v4/projects/${CI_PROJECT_ID}/packages/npm/
- npm config set -- '//lab.frogg.it/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}'
- npm config set -- '//lab.frogg.it/api/v4/packages/npm/:_authToken={CI_JOB_TOKEN}'
- npm publish
# rules:
# - if: $CI_COMMIT_TAG