-
Notifications
You must be signed in to change notification settings - Fork 73
40 lines (34 loc) · 1.07 KB
/
docs.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
name: Deploy docs
on:
push:
branches:
- development
jobs:
deploy-docs:
name: Deploy docs on gh-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Rust setup (nightly)
uses: dtolnay/rust-toolchain@master
with:
# Use nightly to build the docs with `--cfg docsrs`
toolchain: nightly
components: rust-docs
- name: Build docs
# Building locally:
# for `--enable-index-page` it is required to pass `-Z unstable-options` to rustdocs
run: RUSTDOCFLAGS="--cfg docsrs -Z unstable-options --enable-index-page" cargo +nightly build-docs
- name: Prepare /docs
run: |
rm -rf ./docs
mv target/doc ./docs
- name: Deploy gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
# we build and publish docs from `development` branch only
destination_dir: ./docs/${{ github.ref_name }}