Skip to content

Merge pull request #814 from adria0/fix/mdbook #10

Merge pull request #814 from adria0/fix/mdbook

Merge pull request #814 from adria0/fix/mdbook #10

Workflow file for this run

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