-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (51 loc) · 1.33 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Documentation
on:
push:
branches:
- "main"
paths:
- "docs/**"
- "types/**"
- "mkdocs.yml"
workflow_dispatch:
permissions:
id-token: write
pages: write
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install MD-Models
run: cargo install --path .
- name: Run the generation pipeline
run: sh .github/scripts/generate_types.sh
- name: "Update docs"
shell: "bash"
run: |
if [[ `git status --porcelain` ]]; then
git add --all
git config --global user.name 'MD-Models Bot'
git config --global user.email '[email protected]'
git commit -am "Doc update"
git push
else
echo "Nothing changed!"
fi
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v2
with:
path: .cache
key: ${{ github.ref }}
- name: Install dependencies
run: pip install mkdocs-material jupyter nbconvert mkdocs-jupyter
- name: Deploy Documentation
run: mkdocs gh-deploy --force