-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.18 KB
/
docs.yml
File metadata and controls
46 lines (41 loc) · 1.18 KB
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
name: Publish docs
on:
push:
branches:
- main
jobs:
docs:
name: Publish docs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Build docs
# enable again when crate is done
#env:
# RUSTDOCFLAGS: --cfg docsrs -D rustdoc::broken_intra_doc_links
run: |
cargo +nightly doc --no-deps --all-features
# TODO: have this option point to Botanist's code for examples
# ` -Z rustdoc-scrape-examples=examples`
# maybe fetching the sources then pointing to that folder?
- name: Move files
shell: bash
run: |
DIR=${GITHUB_REF#refs/heads/}
mkdir -p ./docs/$DIR
mv ./target/doc/* ./docs/$DIR/
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs
allow_empty_commit: false
keep_files: true