-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.ci.yml
55 lines (50 loc) · 1.23 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
# Triggered only after MR is created/modified/closed and on master
.common_only: &common_only
only:
- master
- merge_requests
- schedules
- triggers
stages:
- build
- deploy
image: $CI_DOCS_DOCKER_IMAGE
build:
stage: build
tags: ['ace-x86_64']
<<: *common_only
before_script:
- apt update && apt install -y git librsvg2-bin
- pip3 install -r requirements.txt
script:
# checkout on the specified version if needed
- |
if [ -n "$TARGET_VERSION" ]; then
echo -e "\n========== DOING CHECKOUT ON VERSION ============"
echo "$TARGET_VERSION"
git checkout "$TARGET_VERSION"
fi
- echo -en "\nhtml_js_files = [ '$ANNOTANT' ]" >> source/conf.py
- make html
- rm -R build/html/_sources
- make text
- for file in $(find build/text -type f -name '*.txt'); do mv "$file" "${file%.txt}.rst.txt"; done
- mv build/text build/html/_sources
- tar cf $CI_DOCS_ARCHIVE -C build/html/ .
artifacts:
paths:
- $CI_DOCS_ARCHIVE
deploy:
variables:
GIT_STRATEGY: none
dependencies:
- build
stage: deploy
tags: ['docs']
<<: *common_only
except:
- triggers
script: echo 'Deploying docs'
artifacts:
paths:
- $CI_DOCS_ARCHIVE