-
Notifications
You must be signed in to change notification settings - Fork 28
/
.drone.yml
156 lines (139 loc) · 2.96 KB
/
.drone.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
kind: pipeline
name: default
workspace:
base: /book
path: PanBook
steps:
- name: build
image: docker:18.09-git
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- export TAG=`git describe --tags --exact-match 2> /dev/null || echo "latest"`
- docker build -t ann17/panbook:$TAG .
- docker tag ann17/panbook:$TAG ann17/panbook:latest
- name: doc-epub
image: ann17/panbook:latest
pull: if-not-exists
commands:
- DEBUG="-d" make epub
depends_on:
- build
- name: doc-ctexbook
image: ann17/panbook:latest
pull: if-not-exists
commands:
- DEBUG="-d" make ctex
- grep -iE "warning|at lines" build/*-ctexbook-pc.log
depends_on:
- doc-epub
- name: doc-ctexbook-6inch
image: ann17/panbook:latest
pull: if-not-exists
commands:
- DEBUG="-d" make ctex6in
- grep -iE "warning|at lines" build/*-ctexbook-mobile.log
depends_on:
- build
- doc-ctexbook
- name: doc-elegantbook
image: ann17/panbook:latest
pull: if-not-exists
commands:
- DEBUG="-d" make elegantbook
- grep -iE "warning|at lines" build/*-elegantbook-pc.log
depends_on:
- build
- doc-ctexbook-6inch
- name: demo-article
image: ann17/panbook:latest
pull: if-not-exists
commands:
- cd demo/article
- DEBUG=-d make build
- grep -iE "warning|at lines" build/*.log
depends_on:
- doc-ctexbook-6inch
- name: demo-slide
image: ann17/panbook:latest
pull: if-not-exists
commands:
- cd demo/beamer
- make all-theme
depends_on:
- build
- demo-article
- name: demo-cv
image: ann17/panbook:latest
pull: if-not-exists
commands:
- cd demo/cv
- make all
depends_on:
- build
- demo-slide
- name: demo-thesis
image: ann17/panbook:latest
pull: if-not-exists
commands:
- cd demo/thesis
- make all
- grep -iE "warning|at lines" build/*.log
depends_on:
- build
- demo-slide
- name: publish-epub
image: annprog/rsync:latest
pull: if-not-exists
settings:
src: build/*.epub
dest: 172.17.0.1::panbook
depends_on:
- doc-epub
- name: publish-doc
image: annprog/rsync:latest
pull: if-not-exists
settings:
src: build/*.pdf
dest: 172.17.0.1::panbook
depends_on:
- doc-ctexbook
- doc-ctexbook-6inch
- doc-elegantbook
- name: publish-article
image: annprog/rsync:latest
pull: if-not-exists
settings:
src: demo/article/build/*.pdf
dest: 172.17.0.1::panbook
depends_on:
- demo-article
- name: publish-slide
image: annprog/rsync:latest
pull: if-not-exists
settings:
src: demo/beamer/build/*.pdf
dest: 172.17.0.1::panbook
depends_on:
- demo-slide
- name: publish-cv
image: annprog/rsync:latest
pull: if-not-exists
settings:
src: demo/cv/build/*.pdf
dest: 172.17.0.1::panbook
depends_on:
- demo-cv
- name: publish-thesis
image: annprog/rsync:latest
pull: if-not-exists
settings:
src: demo/thesis/build/*.pdf
dest: 172.17.0.1::panbook
depends_on:
- demo-thesis
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock