generated from huidetang/XiandaiFenshuTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
258 lines (241 loc) · 9.52 KB
/
jobs.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
# This is a basic workflow to help you get started with Actions
name: Build books.
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# set-time:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Set current datetime as env variable
# env:
# TZ: 'Asia/Tokyo' # タイムゾーン指定
# run: echo "CURRENT_DATETIME=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
# - name: Show current datetime
# run: echo ${{ env.CURRENT_DATETIME }}
# reviewdog-github-check:
# name: reviewdog (github-check)
# runs-on: ubuntu-latest
# steps:
# #reviewdogのアクション
# - uses: reviewdog/action-setup@v1
# with:
# reviewdog_version: latest
# #textlintを動かすためのnodeアクション
# - uses: actions/setup-node@v3
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: cache-node-modules
# #stepsが失敗(文章の乱れ)した場合でもcacheを取得するようにする
# uses: pat-s/always-upload-cache@v2.1.3
# env:
# cache-name: cache-node-modules
# with:
# path: ~/.npm
# key: node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# node-
# - name: Install textlint
# run: 'npm install --save-dev textlint textlint-rule-preset-smarthr textlint-rule-prh textlint-plugin-review'
# - name: Install dependent module
# run: npm install
# - name: Execute textlint
# env:
# REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# npx textlint -f checkstyle chapter/*.re wiki/*.md README.md \
# | reviewdog -f=checkstyle -name="textlint" -diff="git diff ${{ github.event.pull_request.base.ref }}" -reporter=github-pr-review -level="error"
paper:
# needs: reviewdog-github-check
name: Make PDF for Paper
runs-on: ubuntu-latest
container:
image: ghcr.io/huideyeren/review-docker:main
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Get current date and time
env:
TZ: "Asia/Tokyo" # タイムゾーンを指定
id: date
run: echo "::set-output name=date::$(date +'%Y年%m月%d日_%H時%M分')"
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
- name: Show date and time
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
- name: Install gems.
run: bundle install
- name: Copy plantuml.
run: cp /java/plantuml.jar .
- name: Check tools
run: dot -V && blockdiag --version && java -jar plantuml.jar -version
- name: convert PlantUML
run: pwd | bash ./plantuml.sh >> .plantuml.log
- name: Show .plantuml.log
run: cat .plantuml.log
- name: Convert SVG to PDF
run: pwd | python3 svg.py >> .svg.log
- name: Show .svg.log
run: cat .svg.log
- name: Grayscaling images.
run: pwd | python3 grayscaling.py >> .grayscaling.log
- name: Show .grayscaling.log
run: cat .grayscaling.log
- name: Build PDF.
run: REVIEW_CONFIG_FILE=config-print-pdf.yml bundle exec rake pdf
- name: Upload artifact.
uses: actions/upload-artifact@v3
with:
name: ${{ format('るいざ第3集_{0}_{1}', 'pdf-paper', steps.date.outputs.date) }}
path: book-print-pdf.pdf
pdf-ebook:
# needs: reviewdog-github-check
name: Make PDF for Ebook
runs-on: ubuntu-latest
container:
image: ghcr.io/huideyeren/review-docker:main
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Get current date and time
env:
TZ: "Asia/Tokyo" # タイムゾーンを指定
id: date
run: echo "::set-output name=date::$(date +'%Y年%m月%d日_%H時%M分')"
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
- name: Show date and time
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
- name: Install gems.
run: bundle install
- name: Copy plantuml.
run: cp /java/plantuml.jar .
- name: Check tools
run: dot -V && blockdiag --version && java -jar plantuml.jar -version
- name: convert PlantUML
run: pwd | bash ./plantuml.sh >> .plantuml.log
- name: Show .plantuml.log
run: cat .plantuml.log
- name: Convert SVG to PDF
run: pwd | python3 svg.py >> .svg.log
- name: Show .svg.log
run: cat .svg.log
- name: Build PDF.
run: REVIEW_CONFIG_FILE=config-ebook-pdf.yml bundle exec rake pdf
- name: Upload artifact.
uses: actions/upload-artifact@v3
with:
name: ${{ format('るいざ第3集_{0}_{1}', 'pdf-ebook', steps.date.outputs.date) }}
path: book-pdf-ebook.pdf
epub:
# needs: reviewdog-github-check
name: Make EPUB
runs-on: ubuntu-latest
container:
image: ghcr.io/huideyeren/review-docker:main
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Get current date and time
env:
TZ: "Asia/Tokyo" # タイムゾーンを指定
id: date
run: echo "::set-output name=date::$(date +'%Y年%m月%d日_%H時%M分')"
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
- name: Show date and time
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
- name: Install gems.
run: bundle install
- name: Copy plantuml.
run: cp /java/plantuml.jar .
- name: Check tools
run: dot -V && blockdiag --version && java -jar plantuml.jar -version
- name: convert PlantUML
run: pwd | bash ./plantuml.sh >> .plantuml.log
- name: Show .plantuml.log
run: cat .plantuml.log
- name: Build EPUB.
run: REVIEW_CONFIG_FILE=config-epub.yml bundle exec rake epub
- name: Upload artifact.
uses: actions/upload-artifact@v3
with:
name: ${{ format('るいざ第3集_{0}_{1}', 'epub', steps.date.outputs.date) }}
path: book-epub.epub
vivliostyle:
# needs: reviewdog-github-check
name: Make PDF at Vivliostyle
runs-on: ubuntu-latest
container:
image: ghcr.io/huideyeren/review-docker:main
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Get current date and time
env:
TZ: "Asia/Tokyo" # タイムゾーンを指定
id: date
run: echo "::set-output name=date::$(date +'%Y年%m月%d日_%H時%M分')"
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
- name: Show date and time
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
- name: Install libgbm-dev.
run: sudo apt-get install -y libgbm-dev poppler-utils
- name: Install Node Package.
run: npm install
- name: Compile SCSS.
run: npm run style
- name: Install gems.
run: bundle install
- name: Copy plantuml.
run: cp /java/plantuml.jar .
- name: Check tools
run: dot -V && blockdiag --version && java -jar plantuml.jar -version
- name: convert PlantUML
run: pwd | bash ./plantuml.sh >> .plantuml.log
- name: Show .plantuml.log
run: cat .plantuml.log
- name: Grayscaling images.
run: pwd | python3 grayscaling.py >> .grayscaling.log
- name: Show .grayscaling.log
run: cat .grayscaling.log
- name: Build PDF.
run: REVIEW_CONFIG_FILE=config-vivliostyle.yml REVIEW_VSCLI_USESANDBOX=true bundle exec rake vivliostyle
- name: Upload artifact.
uses: actions/upload-artifact@v3
with:
name: ${{ format('るいざ第3集_{0}_{1}', 'vivliostyle', steps.date.outputs.date) }}
path: book.pdf
vivliostyle-dockerfile:
# needs: reviewdog-github-check
name: Make PDF at Vivliostyle
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Get current date and time
env:
TZ: "Asia/Tokyo" # タイムゾーンを指定
id: date
run: echo "::set-output name=date::$(date +'%Y年%m月%d日_%H時%M分')"
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
- name: Show date and time
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
- name: Build Book
uses: ./.github/actions/
id: build-book
- name: Upload artifact.
uses: actions/upload-artifact@v3
with:
name: ${{ format('るいざ第3集_{0}_{1}', 'vivliostyle-docker', steps.date.outputs.date) }}
path: book.pdf