-
Notifications
You must be signed in to change notification settings - Fork 2.6k
62 lines (50 loc) · 1.3 KB
/
epub.yml
File metadata and controls
62 lines (50 loc) · 1.3 KB
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
name: epub
on:
push:
branches:
- epub
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build EPUB and PDF
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install mdbook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: "latest"
- name: Install Pandoc
uses: pandoc/actions/setup@v1
with:
version: "3.1"
- name: Install Tectonic
uses: wtfjoke/setup-tectonic@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install fonts
run: |
sudo apt-get update
sudo apt-get install -y fonts-noto-cjk fonts-noto-cjk-extra
- name: Install mdbook-pandoc
run: |
cargo install mdbook-pandoc
- name: Build Book
run: mdbook build
- name: List Output Directory
if: always()
run: find book -maxdepth 4
- name: Upload EPUB
if: success()
uses: actions/upload-artifact@v4
with:
name: rust-course-epub
path: book/pandoc/epub/rust-course.epub
- name: Upload PDF
if: success()
uses: actions/upload-artifact@v4
with:
name: rust-course-pdf
path: book/pandoc/pdf/rust-course.pdf