File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Generate GitBook eBooks
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ jobs :
10+ build-ebook :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v3
16+
17+ - name : Set up Pandoc
18+ uses : siacodelabs/setup-pandoc@v1
19+ with :
20+ xelatex : true
21+
22+ - name : Generate EPUB file
23+ run : make epub
24+
25+ - name : Create or update Release and upload EPUB
26+ if : github.ref == 'main' && github.event_name == 'push'
27+ uses : ncipollo/release-action@v1
28+ with :
29+ tag : latest
30+ name : DDIA EBook - Latest Release
31+ artifacts : output/ddia.epub
32+ allowUpdates : true
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35+
36+ - name : Upload generated eBooks
37+ if : github.event_name == 'workflow_dispatch'
38+ uses : actions/upload-artifact@v4
39+ with :
40+ name : ebooks
41+ path : output/ddia.epub
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ convert_to_epub() {
2020 pandoc -o " $OUTPUT_BOOK " --metadata-file=" $meta_file " \
2121 --toc-depth=2 \
2222 --top-level-division=chapter \
23- --file-scope=true \
23+ --file-scope \
2424 --css=" $css_file " \
2525 --webtex \
2626 --wrap=preserve \
You can’t perform that action at this time.
0 commit comments