Skip to content

Commit 617801a

Browse files
authored
Manual to EPUB: convert to XHTML with Tidy before ebook-convert (#60)
1 parent f7346eb commit 617801a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/manual-epub.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,19 @@ jobs:
88
steps:
99
- name: Checkout repository
1010
uses: actions/checkout@v4
11+
12+
- name: Install HTML Tidy
13+
run: |
14+
apt-get update
15+
apt-get install -y tidy
16+
17+
- name: Convert HTML to XHTML with Tidy
18+
# Tidy returns 0 when all's well, 1 when there are warnings and 2 when there are errors.
19+
run: tidy -asxhtml -utf8 -o user_guide/index.xhtml user_guide/index.html || [ $? -eq 0 -o $? -eq 1 ]
20+
1121
- name: Convert ebook
12-
run: ebook-convert user_guide/index.html koreader_user_guide.epub
22+
run: ebook-convert user_guide/index.xhtml koreader_user_guide.epub
23+
1324
- name: Upload
1425
uses: actions/upload-artifact@v4
1526
with:

0 commit comments

Comments
 (0)