-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (34 loc) · 1.01 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
41
42
43
on:
push:
branches:
- main
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
- name: Install latest stable rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Delete existing docs directory
run: rm -rf ./docs/
- name: Generate docs
run: cargo doc --release --no-deps
- name: Create index.html for github pages
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=cli\">" > target/doc/index.html
- name: Create .nojekyll to stop Jekyll builds
run: echo "." > target/doc/.nojekyll
- name: Copy generated docs to docs folder
run: cp -r ./target/doc ./docs
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs
clean: true