Skip to content

Commit bc4e1d8

Browse files
committed
更新同步脚本
1 parent 6a730a5 commit bc4e1d8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/sync-posts.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Sync Posts from Notes Repo
2020
run: |
2121
# 清空现有文章
22-
rm -rf content/posts/*
22+
# rm -rf content/post/*
2323
2424
# 克隆笔记库的publish目录
2525
git clone --depth 1 --filter=blob:none --sparse https://${{ secrets.PAT }}@github.com/NilCent/codenote.git temp-notes
@@ -28,7 +28,7 @@ jobs:
2828
cd ..
2929
3030
# 复制文章到content/posts
31-
cp -r temp-notes/publish/* content/posts/
31+
cp -r temp-notes/publish/* content/post/
3232
rm -rf temp-notes
3333
3434
# 如果有图片等资源,也需要同步
@@ -39,7 +39,7 @@ jobs:
3939
run: |
4040
git config user.name "NilCent"
4141
git config user.email "[email protected]"
42-
git add content/posts/
42+
git add content/post/
4343
# git add static/images/ 2>/dev/null || true
4444
git commit -m "自动同步博客文章: $(date +'%Y-%m-%d %H:%M')" || echo "没有变化"
4545
git push

content/posts/CS110L/first_post.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)