tame tidy a bit #336
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Manual to EPUB | |
on: [pull_request, push] | |
jobs: | |
convert: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/linuxserver/calibre | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install HTML Tidy | |
run: | | |
apt-get update | |
apt-get install -y tidy | |
- name: Convert HTML to XHTML with Tidy | |
# Tidy returns 0 when all's well, 1 when there are warnings and 2 when there are errors. | |
run: tidy -asxhtml -utf8 -o user_guide/index.xhtml user_guide/index.html || [ $? -eq 0 -o $? -eq 1 ] | |
- name: Convert ebook | |
run: ebook-convert user_guide/index.xhtml koreader_user_guide.epub | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: KOReader Manual EPUB | |
path: koreader_user_guide.epub |