Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 0 additions & 12 deletions .github/actions/setup-pipeline/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ inputs:
description: GitHub token for Nix installation
required: true

outputs:
dep-graph-path:
description: Path to the generated dependency graph file
value: ${{ steps.dep-graph.outputs.path }}

runs:
using: composite
steps:
Expand All @@ -30,10 +25,3 @@ runs:
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile

- name: Generate dependency graph
id: dep-graph
shell: bash
run: |
pnpm exec nx dep-graph --file dep-graph.json
echo "path=dep-graph.json" >> $GITHUB_OUTPUT
16 changes: 9 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,35 @@ jobs:
run: pnpm run lint

- name: Build scraper and generate database
run: pnpm exec nx build scraper
run: pnpm run build:scraper
env:
DATABASE_URL: file:app/static/deadlog.db

- name: Export database to SQL
run: |
sqlite3 apps/web/static/deadlog.db .dump > deadlog.sql
sqlite3 app/static/deadlog.db .dump > deadlog.sql
grep -v -E "^(BEGIN|COMMIT|ROLLBACK|SAVEPOINT)" deadlog.sql > deadlog-clean.sql

- name: Drop existing D1 tables
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: pnpm exec wrangler d1 execute deadlog --remote --file=libs/db/drop-tables.sql --config=apps/web/wrangler.toml
run: pnpm exec wrangler d1 execute deadlog --remote --file=lib/db/drop-tables.sql --config=app/wrangler.toml

- name: Import new data to D1 database
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: pnpm exec wrangler d1 execute deadlog --remote --file=deadlog-clean.sql --config=apps/web/wrangler.toml
run: pnpm exec wrangler d1 execute deadlog --remote --file=deadlog-clean.sql --config=app/wrangler.toml

- name: Build web project
run: pnpm exec nx build web
run: pnpm run build
env:
CLOUDFLARE: true
DATABASE_URL: file:apps/web/static/deadlog.db
DATABASE_URL: file:app/static/deadlog.db

- name: Deploy to Cloudflare Workers
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: pnpm exec wrangler deploy --config=apps/web/wrangler.toml
run: pnpm exec wrangler deploy --config=app/wrangler.toml
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Build web
if: matrix.task == 'build'
run: pnpm exec nx build web
run: pnpm run build:scraper && pnpm run build
env:
NODE_ENV: production

Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ node_modules
# Build artifacts
/dist
/.svelte-kit
/apps/web/.svelte-kit
/apps/web/static/assets/meta/
/app/.svelte-kit
/app/static/assets/meta/
.nx/cache
.nx/workspace-data
apps/web/static/deadlog.db
app/static/deadlog.db
8 changes: 0 additions & 8 deletions .mcp.json

This file was deleted.

File renamed without changes.
25 changes: 25 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "deadlog-web",
"version": "1.0.0",
"type": "module",
"private": true,
"scripts": {
"dev": "DATABASE_URL=file:static/deadlog.db vite dev --port 5173",
"build": "DATABASE_URL=file:static/deadlog.db vite build",
"preview": "DATABASE_URL=file:static/deadlog.db vite preview --port 4173",
"prepare": "svelte-kit sync",
"check": "svelte-check --tsconfig tsconfig.json",
"test": "vitest run",
"lint": "eslint ."
},
"dependencies": {
"@deadlog/db": "workspace:*",
"@deadlog/scraper": "workspace:*",
"@deadlog/utils": "workspace:*",
"@sveltejs/kit": "2.50.1",
"svelte": "5.48.0"
},
"devDependencies": {
"layerchart": "2.0.0-next.27"
}
}
Loading