Skip to content

Commit b150597

Browse files
authored
frontend (#27)
1 parent c239b51 commit b150597

File tree

32 files changed

+479
-18
lines changed

32 files changed

+479
-18
lines changed
File renamed without changes.

.github/workflows/deploy-web.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["dev"]
6+
paths:
7+
- "src/web/**"
8+
- ".github/workflows/deploy-pages.yml"
9+
- "!**.md"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: denoland/setup-deno@v2
27+
with:
28+
deno-version: v2.x
29+
30+
- name: Build
31+
run: |
32+
cd src/web
33+
deno task build
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: ./src/web/dist
39+
40+
deploy:
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

.github/workflows/test.yml renamed to .github/workflows/test-supabase.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check
1+
name: Check Supabase
22

33
on:
44
pull_request:
@@ -22,10 +22,11 @@ jobs:
2222
environment: test
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- uses: denoland/setup-deno@v2
2727
with:
2828
deno-version: v2.x
29+
2930
- run: deno fmt --check supabase/*
3031
- run: deno lint supabase/*
3132
- run: deno run tests

.github/workflows/test-web.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check Web
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- ready_for_review
10+
paths:
11+
- "src/web/**"
12+
- ".github/workflows/deploy-pages.yml"
13+
- "!**.md"
14+
workflow_dispatch:
15+
16+
jobs:
17+
qa:
18+
environment: test
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: denoland/setup-deno@v2
23+
with:
24+
deno-version: v2.x
25+
26+
- name: Build
27+
run: |
28+
cd src/web
29+
deno task build
30+
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: ./src/web/dist

.gitignore

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
1-
.idea
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
210
node_modules
11+
dist
12+
dist-ssr
13+
.vite
14+
*.local
15+
16+
# Editor directories and files
17+
.idea
18+
.DS_Store
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?
24+
25+
# custom
326
supabase/functions/.env
427
deno.lock
528
.env

.hooks/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/hook.sh"
33

4-
deno fmt supabase/*
5-
deno lint supabase/*
4+
deno task format
5+
deno task lint

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["denoland.vscode-deno"]
3+
}

deno.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
{
2+
"workspace": [
3+
"./src/shared",
4+
"./src/web",
5+
"./supabase/functions"
6+
],
27
"tasks": {
38
"hook": "deno run --allow-read --allow-run --allow-write https://deno.land/x/[email protected]/mod.ts",
49
"dev": "supabase start",
510
"serve": "supabase functions serve --no-verify-jwt",
611
"studio": "open http://localhost:54323",
712
"tests": "deno test --allow-all supabase/functions/tests/*",
8-
"format": "deno fmt supabase/*",
9-
"lint": "deno lint supabase/*",
13+
"format": "deno fmt src/shared/* supabase/*",
14+
"lint": "deno lint src/shared/* supabase/*",
1015
"migration": "supabase migration new",
1116
"migrate": "supabase migration up",
12-
"update-types-local": "supabase gen types typescript --local > supabase/functions/_shared/db/database.types.ts",
13-
"update-types-linked": "supabase gen types typescript --linked > supabase/functions/_shared/db/database.types.ts"
17+
"update-types-local": "supabase gen types typescript --local > src/shared/db.types.ts",
18+
"update-types-linked": "supabase gen types typescript --linked > src/shared/db.types.ts"
1419
},
1520
"imports": {
16-
"@std/assert": "jsr:@std/assert@1"
21+
"@sentry/deno": "npm:@sentry/deno@^9.1.0",
22+
"@std/assert": "jsr:@std/assert@1",
23+
"@supabase/supabase-js": "jsr:@supabase/supabase-js@^2.48.1"
1724
}
1825
}

src/shared/db.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./db.types.ts";
2+
export * from "./supabase.ts";
File renamed without changes.

0 commit comments

Comments
 (0)