-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
50 lines (47 loc) · 1003 Bytes
/
.gitlab-ci.yml
File metadata and controls
50 lines (47 loc) · 1003 Bytes
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
44
45
46
47
48
49
50
stages:
- deploy
- pages
variables:
NODE_VERSION: "20"
PNPM_VERSION: "9"
# ----------------------
# GitLab Pages Deployment
# ----------------------
deploy:
stage: deploy
image: node:20
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .pnpm-store/
before_script:
- npm install -g pnpm@${PNPM_VERSION}
- cd ./bindings/javascript
script:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm doc
- cp -r ./docs ./examples
- mkdir -p ../../public
- cp -r ./examples/* ../../public/
artifacts:
paths:
- public/
rules:
- if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"'
# ----------------------
# GitLab Pages Deployment
# ----------------------
pages:
stage: pages
script:
- echo "Deploying to GitLab Pages..."
artifacts:
paths:
- public
rules:
- if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"'
needs:
- job: deploy
artifacts: true