-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (52 loc) · 1.55 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
name: Documentation
on: [pull_request]
jobs:
check-docstrings:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name : Check docstrings
run : pydocstyle src/ --convention google --count
build-docs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Generate Documentation
run: pdoc example --output-dir docs --logo "https://pollen-robotics.github.io/python-template/POLLEN_LOGO.png" --logo-link "https://www.pollen-robotics.com"
- name: Archive Documentation
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/
publish-docs:
needs: build-docs
runs-on: ubuntu-22.04
steps:
- name: Download Documentation
uses: actions/download-artifact@v4
with:
name: documentation
path: docs/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs