Skip to content

Commit cd0ffd1

Browse files
committed
Generate the documentation directly from the repository
1 parent 0928189 commit cd0ffd1

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ jobs:
3838
uses: actions/setup-python@v4
3939
with:
4040
python-version: ${{ matrix.python-version }}
41-
- name: Install pygame-ce
41+
- name: Generate the pygame-ce documentation
4242
run: |
4343
python -m pip install --upgrade pip
44-
pip install pygame-ce --pre
45-
- name: Clone and move docs
46-
run: |
44+
pip install sphinx
45+
git clone https://github.com/pygame-community/pygame-ce.git
46+
cd pygame-ce
47+
python setup.py docs
48+
cd ../
4749
python utils/generate_docs.py
4850
4951
# Build website

utils/generate_docs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
you managed to run this very file, please discard your changes and
77
do not do it again.
88
"""
9-
import pygame
109
import shutil
1110
import os
1211

1312

1413
if "__main__" == __name__:
1514
target_directory = os.path.join("public", "docs")
16-
docs_path = os.path.join(os.path.dirname(pygame.__file__), "docs", "generated")
15+
docs_path = os.path.join("pygame-ce", "docs", "generated")
1716
print(f"Found these files: {os.listdir(docs_path)}")
1817
if os.path.exists(target_directory):
1918
print("public/docs exists found, deleting.")

0 commit comments

Comments
 (0)