Skip to content

Commit b88966d

Browse files
committed
Adding documentation
1 parent c367c4f commit b88966d

File tree

24 files changed

+4403
-3577
lines changed

24 files changed

+4403
-3577
lines changed

.github/workflows/docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Deploy MkDocs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
paths:
9+
- 'docs/**'
10+
- 'mkdocs.yml'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: '3.x'
35+
36+
- name: Install Poetry
37+
uses: snok/install-poetry@v1
38+
with:
39+
virtualenvs-create: true
40+
virtualenvs-in-project: true
41+
42+
- name: Load cached venv
43+
id: cached-poetry-dependencies
44+
uses: actions/cache@v3
45+
with:
46+
path: .venv
47+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
48+
49+
- name: Install dependencies
50+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
51+
run: poetry install --no-interaction --no-root
52+
53+
- name: Install MkDocs
54+
run: poetry add mkdocs mkdocs-material
55+
56+
- name: Build MkDocs site
57+
run: poetry run mkdocs build
58+
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v2
61+
with:
62+
path: ./site
63+
64+
deploy:
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
runs-on: ubuntu-latest
69+
needs: build
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v2

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,6 @@ print(df)
102102
db.close()
103103
```
104104

105-
## Documentation
106-
107-
View [dapi API doc](https://designsafe-ci.github.io/dapi/dapi/index.html)
108-
109-
To generate API docs:
110-
111-
```
112-
pdoc --html --output-dir docs dapi --force
113-
```
114105

115106
## Support
116107

@@ -141,3 +132,26 @@ poetry run pytest -v
141132
* Krishna Kumar, University of Texas at Austin
142133
* Prof. Pedro Arduino, University of Washington
143134
* Prof. Scott Brandenberg, University of California Los Angeles
135+
136+
137+
## Documentation
138+
139+
View [dapi API doc](https://designsafe-ci.github.io/dapi/dapi/index.html)
140+
141+
### Running documentation locally
142+
143+
To serve the MkDocs documentation locally:
144+
145+
```shell
146+
poetry install
147+
poetry run mkdocs serve
148+
```
149+
150+
This will start a local server at `http://127.0.0.1:8000/dapi/` where you can view the documentation.
151+
152+
### API docs
153+
To generate API docs:
154+
155+
```
156+
pdoc --html --output-dir docs dapi --force
157+
```

0 commit comments

Comments
 (0)