-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
72 lines (68 loc) · 2 KB
/
.gitlab-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
buildPages:
image: python:3.7-alpine
stage: .pre
before_script:
- apk update
- apk add doxygen
- apk add perl
## Uncomment the following line if you use graphviz dot graphs
- apk add graphviz
- apk add hugo
script:
# hogo home pages
- cd manual/home
- hugo
- cd ../..
- cp -rf manual/home/public/ .
# doxygen documentation
- doxygen Doxyfile
- cp -rf doxygen/html/* public/doxygen
# sphinx manual
# to use sphinxcontrib-bibtex, the sphinx version must be 1.6.7 or lower
- pip install sphinx==1.6.7
- pip install sphinxcontrib-bibtex sphinx_inline_tabs sphinx_sitemap #exhale breathe
- pip install sphinx-intl
- pip install sphinx_copybutton
# - pip install matplotlib
# - apk add python-numpy python-matplotlib
- sphinx-intl build
- sphinx-build -b html manual/sphinx/source public/manual/en
- sphinx-build -b html manual/sphinx/source public/manual/zh -Dlanguage=zh
- sphinx-build -b latex manual/sphinx/source public/latex/en
- sphinx-build -b latex manual/sphinx/source public/latex/zh -Dlanguage=zh
- cp manual/sphinx/index.html public/manual # the default entrance
# - sed 's/en\/index.html/manual\/en\/index.html/g' manual/sphinx/index.html | sed 's/zh\/index.html/manual\/zh\/index.html/g' >public/index.html # main entrance
# - sphinx-build -b html manual/sphinx/source public/manual
artifacts:
paths:
- public
only:
- master
latex:
image: laurenss/texlive-full
stage: build
script:
- cd public/latex/en && make
- cd ../zh && make
dependencies:
- buildPages
artifacts:
paths:
- public
when: on_success
only:
- master
pages:
image: python:3.7-alpine
script:
- mkdir public/downloads
- cp public/latex/en/SaltWaterEOS.pdf public/downloads/SaltWaterEOS_en.pdf
- cp public/latex/zh/SaltWaterEOS.pdf public/downloads/SaltWaterEOS_zh.pdf
- rm -rf public/latex
dependencies:
- latex
artifacts:
paths:
- public
only:
- masterxx