Skip to content

Commit

Permalink
Generate standings table automatically
Browse files Browse the repository at this point in the history
Replaces the manual process of updating the standings table in the
contentful post with a custom contentful entry that will be replaced
with a table that fetches the standings from supabase.

Includes several changes to make this work:
- Setup the supabase client
- Create an API route to fetch the standings for a given week range
- Create a contentful entry for the standings that is replaced by html
  - Ideally we could use a svelte component to replace this instead of
  raw html but one thing at a time

Also did some rearranging of the various models and utils to hopefully
allow us to scale our file structure better.

And switched to pnpm.
  • Loading branch information
tuckergordon committed Dec 7, 2024
1 parent b99685e commit a3ee19b
Show file tree
Hide file tree
Showing 20 changed files with 1,375 additions and 6,727 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/web-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,62 +18,65 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
run_install: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install Dependencies
run: npm install
run: pnpm install

- name: Check Svelte
run: npm run check:svelte
run: pnpm run check:svelte

- name: Check Lint
run: npm run check:lint
run: pnpm run check:lint

- name: Check Formatting
run: npm run check:format
run: pnpm run check:format

build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
run_install: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install Dependencies
run: npm install
run: pnpm install

- name: Build
run: npm run build
run: pnpm run build

test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
run_install: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install Dependencies
run: npm install
run: pnpm install

- name: Unit tests
run: npm run test:unit

# - name: Install Playwright Browsers
# run: npx playwright install --with-deps

# - name: Playwright tests
# run: npm run test:integration
run: pnpm run test:unit
10 changes: 7 additions & 3 deletions web/.env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Rename this file `.env.local` and replace these with actual values from contentful
# Rename this file `.env.local` and replace these with actual values from contentful/supabase

# Space ID
## Contentful
CONTENTFUL_SPACE_ID=...
# Content Delivery API - access token
CONTENTFUL_ACCESS_TOKEN=...
# Content Preview API - access token
CONTENTFUL_PREVIEW_ACCESS_TOKEN=...
CONTENTFUL_PREVIEW_ACCESS_TOKEN=...

## Supabase
SUPABASE_PROJECT_ID=...
SUPABASE_ANON_KEY=...
Loading

0 comments on commit a3ee19b

Please sign in to comment.