我在 nanoc 网页上按照本教程在github 上部署了我的网页。我遵循了这些说明
% rm -rf output
% git clone . output
% cd output
output@master% git checkout --orphan gh-pages
output@gh-pages% git rm -rf
output@gh-pages% git remote rm origin
output@gh-pages% git remote add origin repo-url
但是当我想跑步时
nanoc
nanoc deploy
我需要更改nanoc.yaml文件所在的基本目录。但是在切换时,我也会从 gh-pages 分支变回(?)到主分支。我想这是因为分支的孤儿性质,但这只是疯狂的猜测。
nanoc 以此错误消息终止
Loading site… done
Deploying via Git to branch “gh_pages” on remote “origin”…
git@github.com:name/repo_name.git
error: pathspec 'gh_pages' did not match any file(s) known to git.
Captain! We’ve been hit!
Message:
Nanoc::Deploying::Deployers::Git::Errors::BranchDoesNotExist: The branch to deploy, gh_pages, does not exist.
这是nanoc.yaml文件的相关部分。(其余为不变标准)
deploy:
default:
kind: git
remote: git@github.com:name/repo_name.git
branch: gh_pages
希望有人能告诉我我的船在哪里被击中以及如何避开这块冰石;)