-
Notifications
You must be signed in to change notification settings - Fork 73
38 lines (36 loc) · 1.14 KB
/
rustdoc.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
name: Generate doc
# Triggerred when a new commit is pushed to master
on:
push:
branches:
- master
jobs:
publish-rustdoc-as-ghpages:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install nightly
uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy
target: i686-unknown-linux-gnu
# This overwrites the default toolchain with the toolchain specified above.
override: true
- name: Append sha to crate version
run: |
sed -i 's/^version = "[0-9]\+.[0-9]\+.[0-9]\+/&-'${GITHUB_SHA}'/' Cargo.toml
- name: Generate rustdoc
run: ./.github/scripts/ci-doc.sh
- name: Copy docs
# docs.mmtk.io is the root for github pages.
# mmtk full doc: /api
run: |
cp -r docs/userguide/book to_publish
cp -r target/doc to_publish/api
- name: Deploy to Github Page
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.CI_ACCESS_TOKEN }}
publish_dir: to_publish
publish_branch: gh-pages
cname: docs.mmtk.io