-
Notifications
You must be signed in to change notification settings - Fork 34
74 lines (67 loc) · 2.14 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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: "Docs: Check and Deploy"
on:
push:
branches: [main, github-actions-test]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.10.11]
steps:
- uses: actions/checkout@v4
- name: Build using Python ${{matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies [pip]
run: |
pip install --upgrade pip setuptools wheel
pip install -e .[doc]
- name: Install Pandoc [apt-get]
run: |
sudo apt-get -y install pandoc
- name: Generate Docs [Sphinx]
run: |
sphinx-build -b html -D version=latest -D release=latest docs docs/_build
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'pyt-team/TopoNetX' }}
with:
branch: main
folder: docs/_build
token: ${{ secrets.DOCUMENTATION_KEY }}
repository-name: pyt-team/pyt-team.github.io
target-folder: toponetx
clean: true
numpydoc-validation:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.11.3]
steps:
- uses: actions/checkout@v4
- name: Build using Python ${{matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies [pip]
run: |
pip install --upgrade pip setuptools wheel
pip install -e .[doc]
- name: Checking NumpyDoc Validation for files
run: |
numpydoc lint test/**/*.py toponetx/**/*.py