-
Notifications
You must be signed in to change notification settings - Fork 94
56 lines (46 loc) · 1.58 KB
/
gh-page.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
name: Deploy Specifications & Docs to GitHub Pages
on:
push:
branches: ["master"]
env:
OCAML_VERSION: "4.14.0"
# This version has been chosen randomly. It seems that with 2023-11-16, it is
# broken. The compiler crashes. Feel free to pick any newer working version.
RUST_TOOLCHAIN_VERSION: "1.72"
jobs:
release:
name: GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Use shared Rust toolchain setting up steps
uses: ./.github/actions/toolchain-shared
with:
rust_toolchain_version: ${{ env.RUST_TOOLCHAIN_VERSION }}
- name: Use shared OCaml setting up steps
uses: ./.github/actions/ocaml-shared
with:
ocaml_version: ${{ env.OCAML_VERSION }}
# This must be the same as in the section "Generate rustdoc locally" in the README.md
- name: Build Rust Documentation
run: |
eval $(opam env)
RUSTDOCFLAGS="--enable-index-page -Zunstable-options -D warnings" cargo doc --workspace --all-features --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@v4
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book/html