fix(bookmarks): 分离书签处理与清理职责,修复清理问题

- 将书签HTML文件的删除操作从 `bookmark-processor.js` 移至Actions工作流。
- `bookmark-processor.js` 现在仅负责解析书签并生成YAML配置。
This commit is contained in:
Zuoling Rong
2025-05-05 21:37:23 +08:00
parent 510fca00f3
commit 10ce3e215c
2 changed files with 23 additions and 14 deletions

View File

@@ -404,13 +404,8 @@ async function main() {
// 更新导航
updateNavigationWithBookmarks();
// 处理完成后,删除原始HTML文件以防止重复处理
try {
fs.unlinkSync(bookmarkFile);
console.log(`Deleted processed HTML file: ${bookmarkFile}`);
} catch (deleteError) {
console.warn(`Warning: Could not delete processed HTML file: ${deleteError.message}`);
}
// 不再删除原始HTML文件留给GitHub Actions处理
console.log(`Processing complete. HTML files will be cleaned up by GitHub Actions workflow.`);
} catch (writeError) {
console.error(`ERROR writing file:`, writeError);
process.exit(1);