Skip to content

Commit 770dd33

Browse files
haileyhuber8Copilot
andcommitted
Deploy frontend to GitHub Pages
- Switch data loading from API to static JSON files - Add base path for GitHub Pages subpath - Add GitHub Actions workflow for Pages deployment - Copy data files to client/public/data/ - Fix unused variable TS errors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 436ba11 commit 770dd33

8 files changed

Lines changed: 12035 additions & 11 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: npm
27+
cache-dependency-path: client/package-lock.json
28+
29+
- name: Install & Build
30+
working-directory: client
31+
run: |
32+
npm ci
33+
npm run build
34+
35+
- uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: client/dist
38+
39+
deploy:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
steps:
46+
- id: deployment
47+
uses: actions/deploy-pages@v4

client/public/data/analysis.json

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
{
2+
"totalContestants": 100,
3+
"totalSeasons": 20,
4+
"winners": {
5+
"count": 20,
6+
"avgPointsPerTask": 3.16,
7+
"avgPointsPerEpisode": 16.96,
8+
"avgEpisodeWinPct": 29.9,
9+
"avgTaskWinPct": 30.4,
10+
"byTaskType": {
11+
"prize": 3.2,
12+
"filmed": 3.13,
13+
"live": 3.2
14+
},
15+
"byActivity": {
16+
"creative": 3.2,
17+
"mental": 3.11,
18+
"physical": 3.26,
19+
"social": 3.13
20+
},
21+
"byJudgement": {
22+
"objective": 3.14,
23+
"subjective": 0,
24+
"combo": 0
25+
}
26+
},
27+
"nonWinners": {
28+
"count": 80,
29+
"avgPointsPerTask": 2.96,
30+
"avgPointsPerEpisode": 14.94,
31+
"avgEpisodeWinPct": 19.51,
32+
"avgTaskWinPct": 25.27,
33+
"byTaskType": {
34+
"prize": 3.01,
35+
"filmed": 2.81,
36+
"live": 2.73
37+
},
38+
"byActivity": {
39+
"creative": 3.04,
40+
"mental": 2.72,
41+
"physical": 2.69,
42+
"social": 2.84
43+
},
44+
"byJudgement": {
45+
"objective": 2.65,
46+
"subjective": 0,
47+
"combo": 0
48+
}
49+
},
50+
"seasonWinners": [
51+
{
52+
"season": 1,
53+
"name": "Josh Widdicombe",
54+
"id": 69
55+
},
56+
{
57+
"season": 2,
58+
"name": "Jon Richardson",
59+
"id": 49
60+
},
61+
{
62+
"season": 3,
63+
"name": "Rob Beckett",
64+
"id": 8
65+
},
66+
{
67+
"season": 4,
68+
"name": "Noel Fielding",
69+
"id": 21
70+
},
71+
{
72+
"season": 5,
73+
"name": "Bob Mortimer",
74+
"id": 42
75+
},
76+
{
77+
"season": 6,
78+
"name": "Liza Tarbuck",
79+
"id": 59
80+
},
81+
{
82+
"season": 7,
83+
"name": "Kerry Godliman",
84+
"id": 26
85+
},
86+
{
87+
"season": 8,
88+
"name": "Lou Sanders",
89+
"id": 54
90+
},
91+
{
92+
"season": 9,
93+
"name": "Ed Gamble",
94+
"id": 22
95+
},
96+
{
97+
"season": 10,
98+
"name": "Richard Herring",
99+
"id": 31
100+
},
101+
{
102+
"season": 11,
103+
"name": "Sarah Kendall",
104+
"id": 177
105+
},
106+
{
107+
"season": 12,
108+
"name": "Morgana Robinson",
109+
"id": 243
110+
},
111+
{
112+
"season": 13,
113+
"name": "Sophie Duker",
114+
"id": 312
115+
},
116+
{
117+
"season": 14,
118+
"name": "Dara Ó Briain",
119+
"id": 378
120+
},
121+
{
122+
"season": 15,
123+
"name": "Mae Martin",
124+
"id": 395
125+
},
126+
{
127+
"season": 16,
128+
"name": "Sam Campbell",
129+
"id": 456
130+
},
131+
{
132+
"season": 17,
133+
"name": "John Robins",
134+
"id": 487
135+
},
136+
{
137+
"season": 18,
138+
"name": "Jack Dee",
139+
"id": 564
140+
},
141+
{
142+
"season": 19,
143+
"name": "Rosie Ramsey",
144+
"id": 600
145+
},
146+
{
147+
"season": 20,
148+
"name": "Maisie Adam",
149+
"id": 693
150+
}
151+
],
152+
"keyInsights": [
153+
"Comparing season winners vs non-winners across all task categories",
154+
"Task type performance correlations with series victory",
155+
"Episode win percentage patterns for champions"
156+
]
157+
}

0 commit comments

Comments
 (0)