diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fa0a7f0..6ac98a3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -43,20 +43,3 @@ jobs: run: bun run build env: NODE_ENV: production - NEXT_TELEMETRY_DISABLED: 1 - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./out - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/lib/spark.ts b/lib/spark.ts index 83898b9..ab40dcd 100644 --- a/lib/spark.ts +++ b/lib/spark.ts @@ -137,7 +137,7 @@ export async function chatSparkX1Http({ user: "GoodActionHub", } - const resp = await fetch("https://spark-api-open.xf-yun.com/v1/chat/completions", { + const resp = await fetch("https://spark-api-open.xf-yun.com/v2/chat/completions", { method: "POST", headers: { "Content-Type": "application/json", diff --git a/next.config.ts b/next.config.ts index eaf37eb..7deeea8 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,16 +1,13 @@ -import type { NextConfig } from "next"; - -const isDev = process.env.NODE_ENV === 'development'; +import type { NextConfig } from "next" const nextConfig: NextConfig = { - output: 'export', + ...(process.env.NEXT_OUTPUT === "export" ? { output: "export" } : {}), trailingSlash: true, skipTrailingSlashRedirect: true, images: { - unoptimized: true + unoptimized: true, }, - experimental: { - } -}; + experimental: {}, +} -export default nextConfig; +export default nextConfig diff --git a/package.json b/package.json index c7f236c..eda49dc 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "build:static": "set COREPACK_ENABLE_AUTO_PIN=0 && next build", + "build:static": "NEXT_OUTPUT=export COREPACK_ENABLE_AUTO_PIN=0 next build", "build:github": "next build", "build:huawei": "npm run build:static", "build:netlify": "next build",