mirror of
https://github.com/ChiChou/entdb.git
synced 2026-08-09 09:16:00 +02:00
Fix build/lint issues and support cross-repo dispatch trigger
This commit is contained in:
@@ -22,6 +22,15 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Show dispatch context
|
||||||
|
if: github.event_name == 'repository_dispatch'
|
||||||
|
run: |
|
||||||
|
echo "Triggered by repository_dispatch"
|
||||||
|
echo "event_type=${{ github.event.action }}"
|
||||||
|
echo "source_repo=${{ github.event.client_payload.source_repo }}"
|
||||||
|
echo "source_sha=${{ github.event.client_payload.source_sha }}"
|
||||||
|
echo "source_ref=${{ github.event.client_payload.source_ref }}"
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
@@ -67,7 +76,10 @@ jobs:
|
|||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/main'
|
if: >-
|
||||||
|
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
|
||||||
|
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') ||
|
||||||
|
github.event_name == 'repository_dispatch'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
|
|||||||
+19
-1
@@ -1 +1,19 @@
|
|||||||
import rootConfig from "../../eslint.config.mjs";
|
import { dirname } from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
import { FlatCompat } from "@eslint/eslintrc";
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = dirname(__filename);
|
||||||
|
|
||||||
|
const compat = new FlatCompat({
|
||||||
|
baseDirectory: __dirname,
|
||||||
|
});
|
||||||
|
|
||||||
|
const config = [
|
||||||
|
{
|
||||||
|
ignores: [".next/**", "out/**", "build/**", "dist/**", "next-env.d.ts"],
|
||||||
|
},
|
||||||
|
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||||
|
];
|
||||||
|
|
||||||
|
export default config;
|
||||||
|
|||||||
Generated
+11485
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,6 @@ import { useSearchParams } from "next/navigation";
|
|||||||
import { useDebounce } from "use-debounce";
|
import { useDebounce } from "use-debounce";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
import { addBasePath } from "@/lib/env";
|
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ let dbReady = false;
|
|||||||
async function loadSQLite(): Promise<SQLite3API> {
|
async function loadSQLite(): Promise<SQLite3API> {
|
||||||
if (sqlite3Module) return sqlite3Module;
|
if (sqlite3Module) return sqlite3Module;
|
||||||
|
|
||||||
const module = await import("@sqlite.org/sqlite-wasm");
|
const sqliteModule = await import("@sqlite.org/sqlite-wasm");
|
||||||
sqlite3Module = module.default || module;
|
sqlite3Module = (sqliteModule.default || sqliteModule) as unknown as SQLite3API;
|
||||||
return sqlite3Module;
|
return sqlite3Module;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user