Skip to content

Commit c08d308

Browse files
committed
Added docs
1 parent 42e70dd commit c08d308

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/docs.yaml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: website
2+
3+
# build the documentation whenever there are new commits on main
4+
on:
5+
push:
6+
# Alternative: only build for tags.
7+
tags:
8+
- '*'
9+
workflow_dispatch:
10+
11+
# security: restrict permissions for CI jobs.
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
# Build the documentation and upload the static HTML files as an artifact.
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.10.11'
24+
cache: 'pip'
25+
- name: Install dependencies
26+
run: |
27+
pip install torch==2.2.0
28+
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.2.0+cpu.html
29+
pip install git+https://github.com/Lezcano/geotorch/
30+
pip install pdoc
31+
32+
# ADJUST THIS: install all dependencies (including pdoc)
33+
- name: Install dect
34+
run: |
35+
pip install -e .
36+
37+
# ADJUST THIS: build your documentation into docs/.
38+
# We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here.
39+
- name: Build Docs
40+
run: |
41+
mkdir -p ./docs
42+
python -m pdoc --docformat numpy --logo "https://avatars.githubusercontent.com/u/88346553?s=200&v=4" dect -o ./docs
43+
44+
- uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: docs/
47+
48+
# Deploy the artifact to GitHub pages.
49+
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
50+
deploy:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
permissions:
54+
pages: write
55+
id-token: write
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
steps:
60+
- id: deployment
61+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)