File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 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
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 # 如果有图片等资源,也需要同步
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
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments