-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (60 loc) · 1.66 KB
/
rustdoc.yaml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: rustdoc
on:
push:
branches:
- master
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
jobs:
rustdoc:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, rust-src
- name: Build Documentation
run: cargo doc --no-deps -p sampling -p net_ensembles
- name: Move Files Checkout
run: |
mkdir -p ./versions/master
mv ./target/doc ./versions/master
git fetch --prune --unshallow
git checkout v0.1.0
- name: Build Documentation v0.1.0
run: cargo doc --all --no-deps
- name: Move Files
run: |
mkdir -p ./versions/v0.1.0
mv ./target/doc ./versions/v0.1.0
- name: Documentation v0.2.1
run: |
mkdir -p ./versions/v0.2.1
git checkout v0.2.1
cargo doc --all --no-deps
mv ./target/doc ./versions/v0.2.1
- name: Documentation v0.2.2
run: |
mkdir -p ./versions/v0.2.2
git checkout 7a3208c76fc2b6d774043764e54620e501997cd6
cargo doc --all --no-deps
mv ./target/doc ./versions/v0.2.2
- name: Redirect
run: |
git checkout master
mv index.html ./versions
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@25ae83ba65b483195e2a1b7b9a5198c271d0d84c #v3.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./versions
force_orphan: true