-
Notifications
You must be signed in to change notification settings - Fork 96
41 lines (38 loc) · 1.26 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
# This is a simple workflow to automatically generate API docs
name: Docs
# Controls when the workflow will run
on:
# Triggers the workflow on push to the main branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docs:
name: Build and publish Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install package
uses: ./.github/actions/install
- name: Build documentation
run: |
cd docs
make clean
sphinx-apidoc \
--module-first \
--separate \
--force \
-d 2 \
--templatedir=source/_templates/ \
-o source/api ../src/
sed -i "2s/.*/API/" source/api/graphnet.rst
make html
- name: Deploy to Github Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.
git-config-email: [email protected]
git-config-name: Andreas Søgaard