Skip to content

Commit a9e0e9e

Browse files
Unify documentation structure and setup GitHub Pages deployment
- Consolidate documentation from tickets, talk, and video into /doc - Move talk docs from talk/doc to doc/talk - Move video docs from video/docs to doc/video - Configure automated deployment to docs.eventyay.com via GitHub Actions - Update Sphinx configurations with Eventyay branding - Switch to alabaster theme with custom CSS - Add comprehensive README.md with build instructions - Configure CNAME for custom domain - Remove legacy documentation folders
1 parent 36dc375 commit a9e0e9e

File tree

267 files changed

+12571
-2960
lines changed

Some content is hidden

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

267 files changed

+12571
-2960
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- enext
7+
- main
8+
paths:
9+
- 'doc/**'
10+
- '.github/workflows/deploy-docs.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+
submodules: recursive
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.11'
35+
36+
- name: Install system dependencies
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y \
40+
enchant-2 \
41+
libffi-dev \
42+
libssl-dev \
43+
libxml2-dev \
44+
libxslt1-dev \
45+
gettext \
46+
libfreetype-dev \
47+
libjpeg-dev \
48+
libpq-dev \
49+
build-essential
50+
51+
- name: Install dependencies
52+
run: |
53+
python -m pip install --upgrade pip
54+
cd doc
55+
# Run comprehensive installation script
56+
bash install-all-deps.sh
57+
env:
58+
# Skip building C extensions if they fail
59+
SKIP_BUILD_EXT: "1"
60+
61+
- name: Build main documentation
62+
run: |
63+
cd doc
64+
# Set minimal environment for Django
65+
export DJANGO_SETTINGS_MODULE=eventyay.config.settings
66+
export EVENTYAY_CONFIG_FILE=/dev/null
67+
make html || echo "Main docs build completed with warnings"
68+
continue-on-error: true
69+
env:
70+
DATABASE_URL: "sqlite:////:memory:"
71+
REDIS_URL: "redis://localhost:6379/0"
72+
73+
- name: Build Talk documentation
74+
run: |
75+
cd doc/talk
76+
export DJANGO_SETTINGS_MODULE=eventyay.config.settings
77+
export EVENTYAY_CONFIG_FILE=/dev/null
78+
make html || echo "Talk docs build completed with warnings"
79+
continue-on-error: true
80+
env:
81+
DATABASE_URL: "sqlite:////:memory:"
82+
REDIS_URL: "redis://localhost:6379/0"
83+
84+
- name: Build Video documentation
85+
run: |
86+
cd doc/video
87+
make html || echo "Video docs build completed with warnings"
88+
continue-on-error: true
89+
env:
90+
SKIP_DJANGO_SETUP: "1"
91+
92+
- name: Consolidate documentation
93+
run: |
94+
mkdir -p _site
95+
# Copy main documentation
96+
if [ -d doc/_build/html ]; then
97+
echo "Copying main documentation..."
98+
cp -r doc/_build/html/* _site/
99+
else
100+
echo "Warning: Main docs not found"
101+
fi
102+
# Copy Talk documentation
103+
if [ -d doc/talk/_build/html ]; then
104+
echo "Copying Talk documentation..."
105+
mkdir -p _site/talk
106+
cp -r doc/talk/_build/html/* _site/talk/
107+
else
108+
echo "Warning: Talk docs not found"
109+
fi
110+
# Copy Video documentation
111+
if [ -d doc/video/_build/html ]; then
112+
echo "Copying Video documentation..."
113+
mkdir -p _site/video
114+
cp -r doc/video/_build/html/* _site/video/
115+
else
116+
echo "Warning: Video docs not found"
117+
fi
118+
# Copy CNAME for custom domain (docs.eventyay.com)
119+
if [ -f doc/CNAME ]; then
120+
echo "Copying CNAME file..."
121+
cp doc/CNAME _site/
122+
fi
123+
# Create .nojekyll to prevent GitHub Pages from ignoring files starting with _
124+
touch _site/.nojekyll
125+
# List contents for verification
126+
echo "Documentation site structure:"
127+
ls -la _site/
128+
129+
- name: Setup Pages
130+
uses: actions/configure-pages@v4
131+
132+
- name: Upload artifact
133+
uses: actions/upload-pages-artifact@v3
134+
with:
135+
path: '_site'
136+
137+
deploy:
138+
environment:
139+
name: github-pages
140+
url: ${{ steps.deployment.outputs.page_url }}
141+
runs-on: ubuntu-latest
142+
needs: build
143+
steps:
144+
- name: Deploy to GitHub Pages
145+
id: deployment
146+
uses: actions/deploy-pages@v4
147+

.github/workflows/gh-pages-deploy.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ __pycache__/
1919
.mypy_cache/
2020
.ipython/
2121
_static/
22+
# Exception: Track documentation static files
23+
!doc/_static/
24+
!doc/talk/_static/
25+
!doc/video/_static/
2226
.idea
2327
.secret
2428
atlassian-ide-plugin.xml

app/eventyay/base/models/auth.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ def reset_password(self, event, user=None, mail_text=None, orga=False):
723723
reset_password.alters_data = True
724724

725725
class orga_urls(EventUrls):
726+
"""URL patterns for organizer panel views related to this user."""
726727
admin = '/orga/admin/users/{self.code}/'
727728

728729
@transaction.atomic

app/eventyay/base/models/cfp.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,21 @@ def is_field_required(self, field):
6565
return self.fields.get(field, default_fields()[field])['visibility'] == 'required'
6666

6767
for field in default_fields().keys():
68-
setattr(cls, f'request_{field}', property(partial(is_field_requested, field=field)))
69-
setattr(cls, f'require_{field}', property(partial(is_field_required, field=field)))
68+
# Create wrapper functions with clean docstrings to avoid RST formatting issues
69+
def make_request_getter(field_name):
70+
def getter(self):
71+
return is_field_requested(self, field_name)
72+
getter.__doc__ = f"Check if {field_name} field is requested."
73+
return getter
74+
75+
def make_require_getter(field_name):
76+
def getter(self):
77+
return is_field_required(self, field_name)
78+
getter.__doc__ = f"Check if {field_name} field is required."
79+
return getter
80+
81+
setattr(cls, f'request_{field}', property(make_request_getter(field)))
82+
setattr(cls, f'require_{field}', property(make_require_getter(field)))
7083
return cls
7184

7285

@@ -103,6 +116,7 @@ class CfP(PretalxModel):
103116
fields = models.JSONField(default=default_fields)
104117

105118
class urls(EventUrls):
119+
"""URL patterns for public CfP (Call for Proposals) views."""
106120
base = '{self.event.orga_urls.cfp}'
107121
editor = '{base}flow/'
108122
questions = '{base}questions/'

app/eventyay/base/models/event.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ class Event(
563563
tickets for.
564564
565565
:param organizer: The organizer this event belongs to
566-
:type organizer: Organizer
566+
:type organizer: eventyay.base.models.organizer.Organizer
567567
:param testmode: This event is in test mode
568568
:type testmode: bool
569569
:param name: This event's full title
@@ -806,6 +806,7 @@ class Event(
806806
)
807807

808808
class urls(EventUrls):
809+
"""URL patterns for public/frontend views of this event."""
809810
base_path = settings.BASE_PATH
810811
base = '{base_path}/{self.slug}/'
811812
login = '{base}login/'
@@ -836,6 +837,7 @@ class urls(EventUrls):
836837
settings_css = '{base}static/event.css'
837838

838839
class orga_urls(EventUrls):
840+
"""URL patterns for organizer/admin panel views of this event."""
839841
base_path = settings.BASE_PATH
840842
base = '{base_path}/orga/event/{self.slug}/'
841843
login = '{base}login/'
@@ -889,6 +891,7 @@ class orga_urls(EventUrls):
889891
new_information = '{base}info/new/'
890892

891893
class api_urls(EventUrls):
894+
"""URL patterns for API endpoints related to this event."""
892895
base_path = settings.TALK_BASE_PATH
893896
base = '{base_path}/api/events/{self.slug}/'
894897
submissions = '{base}submissions/'
@@ -909,6 +912,7 @@ class api_urls(EventUrls):
909912
speaker_information = '{base}speaker-information/'
910913

911914
class tickets_urls(EventUrls):
915+
"""URL patterns for ticket/control panel views of this event."""
912916
_full_base_path = settings.BASE_PATH
913917
base_path = urlparse(_full_base_path).path.rstrip('/')
914918
base = '{base_path}/control/'

app/eventyay/base/models/information.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def log_parent(self):
5959
return self.event
6060

6161
class orga_urls(EventUrls):
62+
"""URL patterns for organizer panel views of speaker information."""
6263
base = edit = '{self.event.orga_urls.information}{self.pk}/'
6364
delete = '{base}delete/'
6465

app/eventyay/base/models/mail.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class Meta:
115115
}
116116

117117
class urls(EventUrls):
118+
"""URL patterns for mail template views."""
118119
base = edit = '{self.event.orga_urls.mail_templates}{self.pk}/'
119120
delete = '{base}delete/'
120121

@@ -344,6 +345,7 @@ class Meta:
344345
}
345346

346347
class urls(EventUrls):
348+
"""URL patterns for queued mail views."""
347349
base = edit = '{self.event.orga_urls.mail}{self.pk}/'
348350
delete = '{base}delete'
349351
send = '{base}send'

app/eventyay/base/models/mixins.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ class PretalxModel(
211211
metaclass=RulesModelBase,
212212
):
213213
"""
214-
Base model for most pretalx models. Suitable for plugins.
214+
Base model for most Eventyay models. Suitable for plugins.
215+
Provides scoped object management, logging, timestamps, and file cleanup.
215216
"""
216217

217218
objects = ScopedManager(event='event')

app/eventyay/base/models/organizer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ def __str__(self) -> str:
147147
return self.name
148148

149149
class orga_urls(EventUrls):
150+
"""URL patterns for organizer panel views of this organizer."""
150151
base_path = settings.BASE_PATH
151152
base = '{base_path}/orga/organizer/{self.slug}/'
152153
settings = '{base_path}/orga/organizer/{self.slug}/settings/'
@@ -444,6 +445,7 @@ def events(self):
444445
return self.limit_events.all()
445446

446447
class orga_urls(EventUrls):
448+
"""URL patterns for organizer panel views of this team."""
447449
base = '{self.organizer.orga_urls.teams}{self.pk}/'
448450
delete = '{base}delete/'
449451

0 commit comments

Comments
 (0)