Skip to content

Commit 74f993b

Browse files
committed
Add github action for auto committing docs
1 parent 9ac69e5 commit 74f993b

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/docs.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Docs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
docs:
9+
name: Docs
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v2
14+
with:
15+
submodules: true
16+
17+
- name: Install stable toolchain
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
profile: minimal
21+
toolchain: stable
22+
override: true
23+
components: rustfmt, clippy
24+
25+
- name: Cache cargo registry
26+
uses: actions/[email protected]
27+
with:
28+
path: ~/.cargo/registry
29+
key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
30+
31+
- name: Cache cargo index
32+
uses: actions/[email protected]
33+
with:
34+
path: ~/.cargo/git
35+
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
36+
37+
- name: Cache cargo target dir
38+
uses: actions/[email protected]
39+
with:
40+
path: target
41+
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
42+
43+
- name: Generate docs
44+
uses: actions-rs/cargo@v1
45+
with:
46+
command: xtask
47+
args: docgen
48+
49+
- uses: stefanzweifel/git-auto-commit-action@v4
50+
with:
51+
commit_message: "docs: Auto generate from source"

0 commit comments

Comments
 (0)