正如标题所说,每次我推送到我的Github页面存储库时,它都会丢失自定义域的设置。为什么会这样呢?
我的静态博客有两个存储库。第一个是托管在AzureDevops上的和私有的。它包含了我的gatbsy站点的所有源代码。第二个是Github的公共回购。
这是我在AzureDevops上用来推送到我的github存储库的部署脚本
git init
git config --global user.email "my.mail@address.com"
git config --global user.name "My name"
git remote add origin $(GitHubPagesRepo)
git add .
git commit -am $Env:Release_ReleaseName
git push origin master --force
保存https://<my token>@github.com/myuser/myuser.github.io.git
的变量$(GitHubPagesRepo)
有什么想法吗?
发布于 2020-05-09 21:42:38
找到原因了!由于强制推送,我总是丢失存储库中的CNAME
文件,这是自定义域工作所必需的。
https://stackoverflow.com/questions/61703492
复制相似问题