> 在站点根目录下创建 `git.bat`文件,每次仅需要运行 `git.bat`即可自动构建并上传到github
```dos
@echo off
set log=%DATE%%TIME%
echo %log%
hugo -D
cd public
git add .
git commit -m "%log% update"
git push -u origin main
pause
```
> 由于ssh上传时不时会失败,遂创建了一个 `push.bat`文件,用于上传失败后重新上传,而不用再次生成静态文件等操作
```dos
@echo off
set log=%DATE%%TIME%
echo %log%
cd public
git push -u origin main
pause
```
此处评论已关闭