Merge pull request #805 from zcash/check-in-lockfile #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |