-
Notifications
You must be signed in to change notification settings - Fork 3
/
.ci.yml
82 lines (77 loc) · 1.79 KB
/
.ci.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
stages:
- build
- doc-deploy
- ui-tests
- deploy
build:
stage: build
image: node:20
before_script:
- npm ci
script:
- npm run lint
- npm run build
artifacts:
paths:
- dist
functional-tests:
stage: ui-tests
image: node:20
dependencies: [build]
before_script:
- npm ci
script:
- ./tests/test-server.sh
- npx playwright install --with-deps chromium
- npm run test
artifacts:
when: always
paths:
- test-results/.last-run.json
- playwright-report/index.html
build-docs:
stage: build
when: manual
image: $CI_DOCS_DOCKER_IMAGE
tags: ["ace-x86_64"]
before_script:
- cd docs
- pip3 install -r requirements.txt
script:
- cd docs
- |
printf "\nfrom antmicro_sphinx_utils.defaults import relative_to_git\nfrom pathlib import Path\ngit_path = relative_to_git(Path(__file__).parent)\nhtml_css_files = ['$MYST_LOADER_REPOSITORY/MystEditor.css']\nhtml_js_files = [(f'$MYST_LOADER_REPOSITORY/myst_loader.js?docs-root={str(git_path).replace(\"/\", \"%%2F\")}', { 'type': 'module' })]" >> source/conf.py
- make html
- cd ..
- tar cf $CI_DOCS_ARCHIVE -C docs/build/html/ .
artifacts:
paths:
- docs/build
- $CI_DOCS_ARCHIVE
doc-deploy:
stage: doc-deploy
image: node:20
tags: ["docs"]
dependencies: [build]
script:
- sed -i -e 's/{}.VITE_COLLAB/"ON"/g' dist/index.js
- sed -i -e 's/{}.VITE_WS_URL/"\/devsignal"/g' dist/index.js
- tar cf $CI_DOCS_ARCHIVE -C dist/ .
artifacts:
paths:
- docs.tar
only:
- merge_requests
deploy-docs:
stage: deploy
when: manual
tags: ["docs"]
image: $CI_DOCS_DOCKER_IMAGE
variables:
GIT_STRATEGY: none
dependencies:
- build-docs
script: echo 'Deploying docs'
artifacts:
paths:
- $CI_DOCS_ARCHIVE