-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (29 loc) · 815 Bytes
/
cd.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
name: CD
on:
push:
branches:
- main
jobs:
docs:
name: Deploy API Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Check Python version
run: python --version
- name: Install dependencies
run: python -m pip install ".[docs]"
- name: Build API documentation
run: |
sphinx-apidoc -Mfeo docs/source mycosmo
sphinx-build docs/source docs/build
- name: Deploy API documentation
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build