forked from zcash/halo2
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.89 KB
/
book.yml
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
63
64
65
66
name: halo2 book
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
# - name: Setup mdBook
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: 'latest'
# mdBook for mdbook-pdf compatibility by fixing broken links in print.html
# Waiting for https://github.com/rust-lang/mdBook/pull/1738 to get merged
- name: Install patched mdbook
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook --git https://github.com/HollowMan6/mdBook.git --rev 62e01b34c23b957579c04ee1b24b57814ed8a4d5
- name: Install mdbook-katex and mdbook-pdf
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-katex mdbook-pdf
- name: Install mdbook-pdf-outline
run: pip3 install mdbook-pdf-outline
- name: Build halo2 book
run: mdbook build book/
- name: Build latest rustdocs
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --workspace --all-features
env:
RUSTDOCFLAGS: -Z unstable-options --enable-index-page --cfg docsrs --html-in-header ${{ github.workspace }}/halo2_proofs/katex-header.html
- name: Move latest rustdocs into book
run: |
mkdir -p ./book/book/html/rustdoc
mv ./target/doc ./book/book/html/rustdoc/latest
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book/html
- name: Upload PDF File to Artifact
uses: actions/upload-artifact@v3
with:
name: The_halo2_Book
path: book/book/pdf-outline/*.pdf