forked from ymd-h/cpprb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
105 lines (96 loc) · 1.96 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
stages:
- export_org
- build
- page_build
- page_deploy
.build_template: &build_env
image: python:3.12
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip"
cache:
- key:
files:
- pyproject.toml
- setup.py
paths:
- "$PIP_CACHE_DIR"
cpprb_build:
<<: *build_env
stage: build
needs:
- README_MD
script:
- pip wheel . -w dist --no-deps
artifacts:
paths:
- dist/*.whl
- src/cpprb/*.html
emacs:
image: iquiw/alpine-emacs
stage: export_org
script:
- emacs --batch README.org -l site/init.el --eval '(setq debug-on-error t)' --eval '(org-hugo-export-wim-to-md :all-subtrees nil t)'
- emacs --batch CHANGELOG.org -l site/init.el --eval '(org-hugo-export-wim-to-md :all-subtrees nil t)'
- cd site
- emacs --batch site.org -l init.el --eval '(org-hugo-export-wim-to-md :all-subtrees nil t)'
artifacts:
paths:
- site/content
except:
- schedules
README_MD:
image: iquiw/alpine-emacs
stage: export_org
script:
- emacs --batch README.org --eval '(org-md-export-to-markdown)'
artifacts:
paths:
- README.md
except:
- schedules
hugo:
image: registry.gitlab.com/pages/hugo:latest
stage: page_build
variables:
GIT_SUBMODULE_STRATEGY: recursive
environment: production
script:
- hugo version
- cd site
- hugo -c content -v
artifacts:
paths:
- public
needs:
- emacs
except:
- schedules
sphinx:
<<: *build_env
stage: page_build
environment: production
script:
- pip install $(echo dist/*.whl)['all']
- sphinx-build -b html sphinx public/api
artifacts:
paths:
- sphinx/*.rst
- public
needs:
- cpprb_build
except:
- schedules
pages:
image: alpine
stage: page_deploy
environment: production
script:
- mkdir -p public/annotation
- mv src/cpprb/*.html public/annotation/
artifacts:
paths:
- public
only:
- master
except:
- schedules