-
Notifications
You must be signed in to change notification settings - Fork 503
71 lines (59 loc) · 2.01 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
67
68
69
70
71
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: '1.76.0'
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 5830c9555a4dc051675d17f1fcb04dd0920543e8
- 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/
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-05
override: true
- 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