Skip to content

Commit 0a091b8

Browse files
committed
Merge rewrite/sveltekit: SvelteKit + TypeScript + D1 database
2 parents 6b12c12 + 2a2b38a commit 0a091b8

69 files changed

Lines changed: 3040 additions & 3 deletions

Some content is hidden

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

.github/workflows/deploy-site.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy Site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- 'worker/**'
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: oven-sh/setup-bun@v2
25+
with:
26+
bun-version: latest
27+
- run: bun install
28+
- run: bun run build
29+
- uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: build
32+
33+
deploy:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
steps:
40+
- id: deployment
41+
uses: actions/deploy-pages@v4
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy Cloudflare Worker
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'worker/**'
8+
workflow_dispatch:
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: oven-sh/setup-bun@v2
16+
with:
17+
bun-version: latest
18+
- run: cd worker && bun install
19+
- run: cd worker && bunx wrangler deploy
20+
env:
21+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.gitignore

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
todo
2-
bg.html
3-
node_modules/
1+
node_modules/
2+
build/
3+
.svelte-kit/
4+
.env
5+
.env.*
6+
worker/.dev.vars
7+
worker/.wrangler/
8+
todo
9+
bg.html

bun.lock

Lines changed: 242 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "amc-trainer",
3+
"version": "2.0.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite dev",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
11+
},
12+
"devDependencies": {
13+
"@sveltejs/adapter-static": "^3.0.8",
14+
"@sveltejs/kit": "^2.16.0",
15+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
16+
"@types/canvas-confetti": "^1.9.0",
17+
"svelte": "^5.0.0",
18+
"svelte-check": "^4.0.0",
19+
"typescript": "^5.0.0",
20+
"vite": "^6.0.0"
21+
},
22+
"dependencies": {
23+
"canvas-confetti": "^1.9.3",
24+
"@fontsource/poppins": "^5.1.0"
25+
}
26+
}

0 commit comments

Comments
 (0)