forked from openmls/openmls
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (46 loc) · 1.19 KB
/
gh-pages.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
name: Documentation
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@master
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: 'latest'
- name: Build docs
run: |
cd openmls
cargo doc --no-deps
touch ../target/doc/.nojekyll
cd ..
mkdir temp_docs
mv target/doc temp_docs
cd book
mdbook build
cd ..
mv book/book temp_docs
cd temp_docs
cat > index.html <<EOF
<!doctype html>
<html>
<a href="doc/openmls/index.html">Docs</a>
<a href="book/index.html">Book</a>
</html>
EOF
- name: Deploy docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: temp_docs