网页更新:脚本提交

aaaaa Lv3

hexo提交又双叒叕遇到问题了。

这次怎么传都传不上去,但是github网页能登录,而且ping也是通的。

现在彻底放弃hexo提交了,改用一段脚本deploy.ps1来提交。

现在只需要在aaaaa_online目录下打开命令行,输入:

1
.\deploy.ps1

即可完成hexo clean + hexo g + hexo d的所有功能。

附上deploy.ps1的源代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
hexo clean
hexo generate
Set-Location -Path .\public
if (!(Test-Path ".git")) {
git init
}
$remoteName = "origin"
$remoteUrl = "git@github.com:aaaaa114514-1/aaaaa114514-1.github.io.git"
if (git remote | Select-String $remoteName) {
git remote remove $remoteName
}
git remote add $remoteName $remoteUrl
git add .
git commit -m "Deploy: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
git branch -M main
git push -u origin main --force
Set-Location -Path ..
Write-Host "Deploy Done!"
  • 标题: 网页更新:脚本提交
  • 作者: aaaaa
  • 创建于 : 2026-02-12 18:15:00
  • 更新于 : 2026-02-12 18:07:21
  • 链接: https://redefine.ohevan.com/2026/02/12/网页更新:脚本提交/
  • 版权声明: 版权所有 © aaaaa,禁止转载。
目录
网页更新:脚本提交