-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
351 lines (351 loc) · 11 KB
/
action.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
name: 'Gitbook Action'
description: 'Gitbook publish for github action'
author: 'xcbeyond'
inputs:
token:
description: 'Can be Token or Password for source_repo(clone token) and publish_repo(clone push token)'
required: true
git_name:
description: 'Default GITHUB_ACTOR, If git name is different with github, please add'
required: false
git_email:
description: 'Default **@users.noreply.github.com If git name is different with github, please add'
required: false
time_zone:
description: 'System Default, if set, like Asia/Shanghai'
required: false
default: 'Asia/Shanghai'
source_token:
description: 'Default token, if not, please add (clone)'
required: false
source_git_name:
description: 'Default git_name, if not, please add'
required: false
source_repo:
description: 'Default this GITHUB_REPOSITORY, if not please add like username/reponame '
required: false
source_hub:
description: 'default is github.com,can be gitlib.com gitee.com ...'
required: false
default: 'github.com'
source_branch:
description: 'Default master'
required: false
default: 'master'
source_dir:
description: 'Where gitbook source. Default is root'
required: false
default: '/'
source_edit_time:
description: 'Default false, if plugins need last edit time, set true'
required: false
default: false
source_file_without_prefix:
description: 'Default true, if you want to ignore file without prefix please set false'
required: true
default: true
publish_token:
description: 'Default token, if not please add (clone push)'
required: false
publish_git_name:
description: 'Default git_name, if not please add'
required: false
publish_git_email:
description: 'Default git_email, if not please add'
required: false
publish_repo:
description: 'Default this GITHUB_REPOSITORY, if not please add like username/reponame'
required: false
publish_commit_message:
description: 'Default Updated by gitbook-action and time, can use last commit message'
required: false
publish_hub:
description: 'Default is github.com,can be gitlib.com gitee.com ...'
required: false
default: 'github.com'
publish_branch:
description: 'Defaule is gh-pages, auto create'
required: false
default: 'gh-pages'
publish_dir:
description: 'Default is root, if not add like docs or docs/gitbook ...'
required: false
default: '/'
publish_commit_history:
description: 'set false will only one commit at publish_repo'
required: false
default: true
publish_cname:
description: 'Default null, can set www.example.com example.com ...'
required: false
default: 'null'
publish_nojekyll:
description: 'Default false, if set true, it will add .nojekyll for publish'
required: false
default: 'false'
publish_push_force:
description: 'Default false. Set true will enable git push force'
required: false
default: false
publish_remove_last_build:
description: 'Default true. Set false not remove last build but rewrite same file'
required: false
default: true
gitbook_cli_version:
description: 'Default is 2.3.2, can choose from https://www.npmjs.com/package/gitbook-cli?activeTab=versions'
required: false
gitbook_version:
description: 'Default is 3.2.3, can choose from https://www.npmjs.com/package/gitbook?activeTab=versions'
required: false
gitbook_pdf:
description: 'Set true will generate pdf file'
required: false
default: false
gitbook_pdf_dir:
description: 'Where the pdf to put. Default mybook, can change / for root, or myebook'
required: false
default: 'mybook'
gitbook_pdf_name:
description: 'The name of your pdf. Default ebook'
required: false
default: 'ebook'
gitbook_epub:
description: 'Set true will generate epub file'
required: false
default: false
gitbook_epub_dir:
description: ''
required: false
default: 'mybook'
gitbook_epub_name:
description: ''
required: false
default: 'ebook'
gitbook_mobi:
description: 'Set true will generate mobi file'
required: false
default: false
gitbook_mobi_dir:
description: ''
required: false
default: 'mybook'
gitbook_mobi_name:
description: ''
required: false
default: 'ebook'
source2_git_name:
description: 'Default git_name, if not please add'
required: false
source2_token:
description: 'Default token, if not please add (clone)'
required: 'false'
source2_hub:
description: ''
required: false
default: 'github.com'
source2_repo:
description: 'Default null, if use please add like username/reponame, (same with source will replace, different will mix)'
required: false
default: 'null'
source2_branch:
description: ''
required: false
default: 'master'
source2_dir:
description: ''
required: false
default: '/'
source2_edit_time:
description: 'Default false if plugins need last edit time, set true'
required: false
default: false
source2_file_without_prefix:
description: 'Default true, if you want to ignore file without prefix please set false'
required: true
default: true
publish2_git_name:
description: 'Default git_name, if not please add'
required: false
publish2_token:
description: 'Default token, if not please add (clone push)'
required: 'false'
publish2_git_email:
description: 'Default git_email, if not please add'
required: false
publish2_commit_message:
description: 'Default Updated by gitbook-action and time'
required: false
publish2_hub:
description: ''
required: false
default: 'github.com'
publish2_repo:
description: 'Default null, if use please add like username/reponame'
required: false
default: 'null'
publish2_branch:
description: 'Default gh-pages'
required: false
default: 'gh-pages'
publish2_nojekyll:
description: 'Default false, if set true, it will add .nojekyll for publish2'
required: false
default: 'false'
publish2_dir:
description: ''
required: false
default: '/'
publish2_cname:
description: 'Default null'
required: false
default: 'null'
publish2_push_force:
description: 'Default false. Set true will enable git push force'
required: false
default: false
publish2_commit_history:
description: 'set false will only one commit at publish2_repo'
required: false
default: true
publish2_remove_last_build:
description: 'Default true. Set false not remove last build but rewrite same file'
required: false
default: true
publish3_git_name:
description: 'Default git_name, if not please add'
required: false
publish3_token:
description: 'Default token, if not please add (clone push)'
required: 'false'
publish3_git_email:
description: 'Default git_email, if not please add'
required: false
publish3_commit_message:
description: 'Default Updated by gitbook-action and time'
required: false
publish3_hub:
description: ''
required: false
default: 'github.com'
publish3_repo:
description: 'Default null, if use please add like username/reponame'
required: false
default: 'null'
publish3_branch:
description: 'Default gh-pages'
required: false
default: 'gh-pages'
publish3_dir:
description: 'Default root'
required: false
default: '/'
publish3_cname:
description: 'Default null'
required: false
default: 'null'
publish3_nojekyll:
description: 'Default false, if set true, it will add .nojekyll for publish3'
required: false
default: 'false'
publish3_push_force:
description: 'Default false. Set true will enable git push force'
required: false
default: false
publish3_commit_history:
description: 'set false will only one commit at publish3_repo'
required: false
default: true
publish3_remove_last_build:
description: 'Default true. Set false not remove last build but rewrite same file'
required: false
default: true
not_clean:
description: 'Default false. Set true will not remove working file'
required: false
default: false
font_install:
description: 'Install font for pdf'
required: false
prepare_install:
description: 'Some install for prepare'
required: false
outputs:
time: # id of output
description: 'The time we greeted you'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.token }}
- ${{ inputs.time_zone }}
- ${{ inputs.git_name }}
- ${{ inputs.git_email }}
- ${{ inputs.source_token }}
- ${{ inputs.source_git_name }}
- ${{ inputs.source_repo }}
- ${{ inputs.source_hub }}
- ${{ inputs.source_branch }}
- ${{ inputs.source_dir }}
- ${{ inputs.source_edit_time }}
- ${{ inputs.source_file_without_prefix }}
- ${{ inputs.publish_token }}
- ${{ inputs.publish_git_name }}
- ${{ inputs.publish_git_email }}
- ${{ inputs.publish_repo }}
- ${{ inputs.publish_commit_message }}
- ${{ inputs.publish_hub }}
- ${{ inputs.publish_branch }}
- ${{ inputs.publish_dir }}
- ${{ inputs.publish_commit_history }}
- ${{ inputs.publish_cname }}
- ${{ inputs.publish_nojekyll }}
- ${{ inputs.publish_push_force }}
- ${{ inputs.publish_remove_last_build }}
- ${{ inputs.gitbook_cli_version }}
- ${{ inputs.gitbook_version }}
- ${{ inputs.gitbook_pdf }}
- ${{ inputs.gitbook_pdf_dir }}
- ${{ inputs.gitbook_pdf_name }}
- ${{ inputs.gitbook_epub }}
- ${{ inputs.gitbook_epub_dir }}
- ${{ inputs.gitbook_epub_name }}
- ${{ inputs.gitbook_mobi }}
- ${{ inputs.gitbook_mobi_dir }}
- ${{ inputs.gitbook_mobi_name }}
- ${{ inputs.source2_git_name }}
- ${{ inputs.source2_token }}
- ${{ inputs.source2_hub }}
- ${{ inputs.source2_repo }}
- ${{ inputs.source2_branch }}
- ${{ inputs.source2_dir }}
- ${{ inputs.source2_edit_time }}
- ${{ inputs.source2_file_without_prefix }}
- ${{ inputs.publish2_git_name }}
- ${{ inputs.publish2_token }}
- ${{ inputs.publish2_git_email }}
- ${{ inputs.publish2_commit_message }}
- ${{ inputs.publish2_hub }}
- ${{ inputs.publish2_repo }}
- ${{ inputs.publish2_branch }}
- ${{ inputs.publish2_commit_history }}
- ${{ inputs.publish2_dir }}
- ${{ inputs.publish2_cname }}
- ${{ inputs.publish2_nojekyll }}
- ${{ inputs.publish2_push_force }}
- ${{ inputs.publish2_remove_last_build }}
- ${{ inputs.publish3_git_name }}
- ${{ inputs.publish3_token }}
- ${{ inputs.publish3_git_email }}
- ${{ inputs.publish3_commit_message }}
- ${{ inputs.publish3_hub }}
- ${{ inputs.publish3_repo }}
- ${{ inputs.publish3_branch }}
- ${{ inputs.publish3_commit_history }}
- ${{ inputs.publish3_dir }}
- ${{ inputs.publish3_cname }}
- ${{ inputs.publish3_nojekyll }}
- ${{ inputs.publish3_push_force }}
- ${{ inputs.publish3_remove_last_build }}
- ${{ inputs.not_clean }}
- ${{ inputs.font_install }}
- ${{ inputs.prepare_install }}