Skip to content

Commit 3ffec8c

Browse files
committed
fix: deploy.sh
1 parent d3555f3 commit 3ffec8c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

deploy.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ echo "📦 构建前端到临时目录..."
2222
cp -r $BASE_DIR $TMP_DIR/frontend
2323
cd $TMP_DIR/frontend
2424
npm install --force
25-
# 清理 Next.js 缓存
25+
# 清理 Next.js 缓存和构建产物
26+
echo "🗑️ 清理缓存..."
2627
rm -rf .next
28+
rm -rf node_modules/.cache
2729
npm run build
2830

2931
echo "🚀 同步前端到生产目录..."

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const nextConfig: NextConfig = {
8282
headers: [
8383
{
8484
key: 'Cache-Control',
85-
value: 'public, max-age=86400'
85+
value: 'public, max-age=3600, must-revalidate'
8686
}
8787
]
8888
}

0 commit comments

Comments
 (0)