mirror of
https://github.com/RhenCloud/Cloud-Home.git
synced 2026-01-22 17:39:07 +08:00
feat: 添加 Netlify 配置,调整 Nuxt 配置和 package.json 设置
This commit is contained in:
28
.github/workflows/lint-format.yml
vendored
28
.github/workflows/lint-format.yml
vendored
@@ -17,22 +17,22 @@ jobs:
|
|||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "24"
|
||||||
cache: "pnpm"
|
cache: "npm"
|
||||||
|
|
||||||
- name: Enable corepack and install pnpm
|
- name: Enable corepack and install npm
|
||||||
run: |
|
run: |
|
||||||
corepack enable
|
corepack enable
|
||||||
corepack prepare pnpm@latest --activate
|
corepack prepare npm@latest --activate
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: npm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run ESLint
|
- name: Run ESLint
|
||||||
run: pnpm lint
|
run: npm lint
|
||||||
|
|
||||||
- name: Run Prettier check
|
- name: Run Prettier check
|
||||||
run: pnpm format:check
|
run: npm format:check
|
||||||
|
|
||||||
format:
|
format:
|
||||||
name: Auto-format (eslint --fix)
|
name: Auto-format (eslint --fix)
|
||||||
@@ -48,22 +48,22 @@ jobs:
|
|||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "24"
|
||||||
cache: "pnpm"
|
cache: "npm"
|
||||||
|
|
||||||
- name: Enable corepack and install pnpm
|
- name: Enable corepack and install npm
|
||||||
run: |
|
run: |
|
||||||
corepack enable
|
corepack enable
|
||||||
corepack prepare pnpm@latest --activate
|
corepack prepare npm@latest --activate
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: npm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run Prettier --write
|
- name: Run Prettier --write
|
||||||
run: pnpm format
|
run: npm format
|
||||||
|
|
||||||
- name: Run ESLint --fix
|
- name: Run ESLint --fix
|
||||||
run: pnpm lint:fix
|
run: npm lint:fix
|
||||||
|
|
||||||
- name: Commit & push fixes
|
- name: Commit & push fixes
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
2
netlify.toml
Normal file
2
netlify.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[images]
|
||||||
|
remote_images = ["https:\\/\\/.*"]
|
||||||
@@ -88,23 +88,7 @@ export default defineNuxtConfig({
|
|||||||
smtpSecure: process.env.SMTP_SECURE ? process.env.SMTP_SECURE === "true" : undefined,
|
smtpSecure: process.env.SMTP_SECURE ? process.env.SMTP_SECURE === "true" : undefined,
|
||||||
wakatimeApiKey: process.env.WAKATIME_API_KEY ?? "",
|
wakatimeApiKey: process.env.WAKATIME_API_KEY ?? "",
|
||||||
wakatimeApiUrl: process.env.WAKATIME_API_URL ?? "https://wakatime.com/api/v1",
|
wakatimeApiUrl: process.env.WAKATIME_API_URL ?? "https://wakatime.com/api/v1",
|
||||||
public: {
|
githubToken: process.env.NUXT_PUBLIC_GITHUB_TOKEN ?? "",
|
||||||
githubToken: process.env.NUXT_PUBLIC_GITHUB_TOKEN ?? "",
|
umamiApiKey: process.env.UMAMI_API_KEY ?? "",
|
||||||
umamiApiKey: process.env.NUXT_PUBLIC_UMAMI_API_KEY ?? "",
|
|
||||||
// Twikoo 评论服务地址(在 Netlify 或部署环境中设置 NUXT_PUBLIC_TWIKOO_URL)
|
|
||||||
twikooUrl: process.env.NUXT_PUBLIC_TWIKOO_URL ?? "",
|
|
||||||
// Giscus 配置(在部署环境中设置 NUXT_PUBLIC_GISCUS_* 系列变量)
|
|
||||||
giscus: {
|
|
||||||
repo: process.env.NUXT_PUBLIC_GISCUS_REPO ?? "",
|
|
||||||
repoId: process.env.NUXT_PUBLIC_GISCUS_REPO_ID ?? "",
|
|
||||||
category: process.env.NUXT_PUBLIC_GISCUS_CATEGORY ?? "",
|
|
||||||
categoryId: process.env.NUXT_PUBLIC_GISCUS_CATEGORY_ID ?? "",
|
|
||||||
mapping: process.env.NUXT_PUBLIC_GISCUS_MAPPING ?? "pathname",
|
|
||||||
reactionsEnabled: process.env.NUXT_PUBLIC_GISCUS_REACTIONS_ENABLED ?? "1",
|
|
||||||
emitMetadata: process.env.NUXT_PUBLIC_GISCUS_EMIT_METADATA ?? "0",
|
|
||||||
inputPosition: process.env.NUXT_PUBLIC_GISCUS_INPUT_POSITION ?? "bottom",
|
|
||||||
theme: process.env.NUXT_PUBLIC_GISCUS_THEME ?? "light",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cloud-home",
|
"name": "cloud-home",
|
||||||
"private": true,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxt dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user