|
|
|
|
@ -3,7 +3,6 @@ name: epub
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
|
|
|
|
- epub
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
|
|
@ -17,20 +16,25 @@ jobs:
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Install mdbook
|
|
|
|
|
uses: peaceiris/actions-mdbook@v2
|
|
|
|
|
with:
|
|
|
|
|
mdbook-version: "latest"
|
|
|
|
|
|
|
|
|
|
- name: Install Pandoc
|
|
|
|
|
uses: pandoc/actions/setup@v3
|
|
|
|
|
with:
|
|
|
|
|
version: "3.1"
|
|
|
|
|
|
|
|
|
|
- name: Install Tectonic
|
|
|
|
|
uses: wtfjoke/setup-tectonic@v1
|
|
|
|
|
with:
|
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
- name: Install Pandoc and Fonts
|
|
|
|
|
- name: Install fonts
|
|
|
|
|
run: |
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install -y pandoc fonts-noto-cjk
|
|
|
|
|
|
|
|
|
|
- name: Install mdbook
|
|
|
|
|
uses: peaceiris/actions-mdbook@v1
|
|
|
|
|
with:
|
|
|
|
|
mdbook-version: "latest"
|
|
|
|
|
sudo apt-get install -y fonts-noto-cjk fonts-noto-cjk-extra
|
|
|
|
|
|
|
|
|
|
- name: Install mdbook-pandoc
|
|
|
|
|
run: |
|
|
|
|
|
@ -44,12 +48,14 @@ jobs:
|
|
|
|
|
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
|
|
|
|
|
|