Skip to content

Commit dcc7ddc

Browse files
authored
Move docs in-source (#1357)
1 parent 0cdd9a7 commit dcc7ddc

File tree

170 files changed

+42686
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+42686
-13
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
name: Build
22

33
on:
4+
# Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder
45
push:
56
branches: [ master ]
67
tags:
78
- 'v*'
9+
paths:
10+
- '**'
11+
- '!docs/**'
12+
- '.github/**'
813
pull_request:
914
branches: [ master ]
15+
paths:
16+
- '**'
17+
- '!docs/**'
18+
- '.github/**'
1019

1120
jobs:
1221
build-client:
@@ -101,24 +110,23 @@ jobs:
101110
runs-on: ubuntu-22.04
102111
steps:
103112
- uses: actions/checkout@v4
104-
with:
105-
repository: 'PhotonVision/photonvision-docs.git'
106-
ref: master
107113
- uses: actions/setup-python@v5
108114
with:
109-
python-version: '3.9'
115+
python-version: '3.11'
110116
- name: Install dependencies
117+
working-directory: docs
111118
run: |
112119
python -m pip install --upgrade pip
113120
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
114121
pip install -r requirements.txt
115122
- name: Build the docs
123+
working-directory: docs
116124
run: |
117125
make html
118126
- uses: actions/upload-artifact@v4
119127
with:
120128
name: built-docs
121-
path: build/html
129+
path: docs/build/html
122130
build-photonlib-host:
123131
env:
124132
MACOSX_DEPLOYMENT_TARGET: 13

.github/workflows/lint-format.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
name: Lint and Format
22

33
on:
4+
# Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder
45
push:
56
branches: [ master ]
67
tags:
78
- 'v*'
9+
paths:
10+
- '**'
11+
- '!docs/**'
12+
- '.github/**'
813
pull_request:
914
branches: [ master ]
15+
paths:
16+
- '**'
17+
- '!docs/**'
18+
- '.github/**'
1019

1120
concurrency:
1221
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
@@ -26,9 +35,9 @@ jobs:
2635
- name: Set up Python 3.8
2736
uses: actions/setup-python@v4
2837
with:
29-
python-version: 3.8
38+
python-version: 3.11
3039
- name: Install wpiformat
31-
run: pip3 install wpiformat
40+
run: pip3 install wpiformat==2024.37
3241
- name: Run
3342
run: wpiformat
3443
- name: Check output

.github/workflows/documentation.yml renamed to .github/workflows/photon-code-docs.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
name: Documentation
1+
name: Photon Code Documentation
22

33
on:
4+
# Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder
45
push:
5-
# For now, run on all commits to master
66
branches: [ master ]
7-
# and also all tags starting with v
87
tags:
98
- 'v*'
9+
paths:
10+
- '**'
11+
- '!docs/**'
12+
- '.github/**'
13+
pull_request:
14+
branches: [ master ]
15+
paths:
16+
- '**'
17+
- '!docs/**'
18+
- '.github/**'
1019

1120
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1221
permissions:
@@ -58,12 +67,12 @@ jobs:
5867
- name: Build javadocs/doxygen
5968
run: |
6069
chmod +x gradlew
61-
./gradlew docs:generateJavaDocs docs:doxygen
70+
./gradlew photon-docs:generateJavaDocs photon-docs:doxygen
6271
6372
- uses: actions/upload-artifact@v4
6473
with:
6574
name: built-docs
66-
path: docs/build/docs
75+
path: photon-docs/build/docs
6776

6877
release:
6978
needs: [build-client, run_docs]
@@ -76,6 +85,7 @@ jobs:
7685

7786
- run: find .
7887
- name: copy file via ssh password
88+
if: github.ref == 'refs/heads/master'
7989
uses: appleboy/[email protected]
8090
with:
8191
host: ${{ secrets.WEBMASTER_SSH_HOST }}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: PhotonVision Sphinx Documentation Checks
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- 'docs/**'
8+
- '.github/**'
9+
pull_request:
10+
branches: [ master ]
11+
paths:
12+
- 'docs/**'
13+
- '.github/**'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.11'
25+
26+
- name: Install and upgrade pip
27+
run: python -m pip install --upgrade pip
28+
29+
- name: Install Python dependencies
30+
working-directory: docs
31+
run: |
32+
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
33+
pip install -r requirements.txt
34+
35+
- name: Check links
36+
working-directory: docs
37+
run: make linkcheck
38+
continue-on-error: true
39+
40+
- name: Check lint
41+
working-directory: docs
42+
run: make lint
43+
44+
- name: Compile HTML
45+
working-directory: docs
46+
run: make html

.github/workflows/python.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@ on:
88
branches: [ master ]
99
tags:
1010
- 'v*'
11+
paths:
12+
- '**'
13+
- '!docs/**'
14+
- '.github/**'
1115
pull_request:
1216
branches: [ master ]
17+
paths:
18+
- '**'
19+
- '!docs/**'
20+
- '.github/**'
1321

1422
jobs:
1523
buildAndDeploy:

docs/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
build/*
2+
.DS_Store
3+
.vscode/*
4+
.idea/*
5+
source/_build
6+
source/_build
7+
photon-docs/build
8+
source/docs/_build
9+
10+
venv/*
11+
.venv/*

docs/.readthedocs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
3+
sphinx:
4+
builder: html
5+
configuration: source/conf.py
6+
fail_on_warning: true
7+
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
13+
python:
14+
install:
15+
- requirements: requirements.txt

docs/.styleguide

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
modifiableFileExclude {
3+
\.jpg$
4+
\.jpeg$
5+
\.png$
6+
\.gif$
7+
\.so$
8+
\.pdf$
9+
\.mp4$
10+
\.dll$
11+
\.webp$
12+
\.ico$
13+
\.rknn$
14+
\.svg$
15+
gradlew
16+
}

0 commit comments

Comments
 (0)