generated from metakgp/README.md
-
Notifications
You must be signed in to change notification settings - Fork 13
41 lines (34 loc) · 888 Bytes
/
docs.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
name: Generate API Documentation
on:
push:
branches:
- main
paths:
- "backend/**"
- ".github/workflows/docs.yaml"
jobs:
gen_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: docs
- name: Reset Branch
run: |
git fetch origin
git reset --hard 'origin/${{ github.ref_name }}'
- name: Set up rust
uses: moonrepo/setup-rust@v1
- name: Generate Rust Docs
run: |
pushd backend/
cargo doc --no-deps
mv target/doc/ ../docs/
popd
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
add: 'docs -f'
commit: --signoff
message: 'docs: updated API documentation'
push: origin docs -f