🐛 fix(ci): skip backend routes in bundle analyzer build (#10944)

- Add isBundleAnalyzer check in prebuild script to skip backend routes when ANALYZE=true && CI=true
- Update bundle analyzer workflow to use fallback KEY_VAULTS_SECRET from generate-secret step
- Increase NODE_OPTIONS memory limit to 8GB
- Remove unnecessary S3_PUBLIC_DOMAIN and APP_URL env vars

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Innei
2025-12-24 22:01:01 +08:00
parent 04de37b0ec
commit 2fc3b4238a

View File

@@ -6,6 +6,7 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';
const isDesktop = process.env.NEXT_PUBLIC_IS_DESKTOP_APP === '1';
const isBundleAnalyzer = process.env.ANALYZE === 'true' && process.env.CI === 'true';
if (isDesktop) {
dotenvExpand.expand(dotenv.config({ path: '.env.desktop' }));
@@ -16,6 +17,12 @@ if (isDesktop) {
// 创建需要排除的特性映射
/* eslint-disable sort-keys-fix/sort-keys-fix */
const partialBuildPages = [
// no need for bundle analyzer (frontend only)
{
name: 'backend-routes',
disabled: isBundleAnalyzer,
paths: ['src/app/(backend)'],
],
// no need for desktop
// {
// name: 'changelog',