Skip to content

Merge pull request #1298 from o1-labs/feature/add-environment #369

Merge pull request #1298 from o1-labs/feature/add-environment

Merge pull request #1298 from o1-labs/feature/add-environment #369

Workflow file for this run

name: Deploy Specifications & Docs to GitHub Pages
on:
push:
branches:
- master
env:
OCAML_VERSION: "4.14.0"
RUST_TOOLCHAIN_VERSION: "nightly"
jobs:
release:
name: GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
# as action-rs does not seem to be maintained anymore, building from
# scratch the environment using rustup
- name: Setup nightly Rust toolchain
run:
|
curl --proto '=https' --tlsv1.2 -sSf -o rustup-init \
https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
chmod +x ./rustup-init
./rustup-init -y --default-toolchain "$RUST_TOOLCHAIN_VERSION" --profile default
rm ./rustup-init
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# overwriting default rust-toolchain
echo $RUST_TOOLCHAIN_VERSION > rust-toolchain
- name: Setup OCaml ${{ env.OCAML_VERSION }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ env.OCAML_VERSION }}
# https://github.com/ocaml/setup-ocaml/issues/211#issuecomment-1058882386
# disable-cache: true
- name: Build Rust Documentation
run: |
eval $(opam env)
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --all --no-deps
- name: Build the mdbook
run: |
eval $(opam env)
cd book
make deps
make build
- name: Arrange website folder hierarchy
run: |
mv ./target/doc ./book/book/html/rustdoc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book/html