travis-ci – 使用Travis CI将Lektor站点部署到Github页面时出错

我有一个Lektor网站,我正在尝试使用
Travis CI trigger approach from the Lektor docs自动部署以响应请求和提交.

Lektor配置在命令行中运行良好.

Travis构建开始,似乎没有问题地构建站点 – 但是当它进入部署时,日志说明如下:

Installing deploy dependencies
!!! Script support is experimental !!!

Preparing deploy
Cleaning up git repository with `git stash --all`. If you need build artifacts for deployment, set `deploy.skip_cleanup: true`. See https://docs.travis-ci.com/user/deployment/#Uploading-Files.
No local changes to save

Deploying application
Deploying to ghpages-https
  Build cache: /home/travis/.cache/lektor/builds/d3a411e13041731555222b901cff4248
  Target: ghpages+https://pybee/pybee.github.io?cname=pybee.org
  Initialized empty Git repository in /home/travis/build/pybee/pybee.github.io/temp/.deploytemp9xhRDc/scratch/.git/
  Fetching origin
  fatal: repository 'https://github.com/pybee/pybee.github.io/' not found
  error: Could not fetch origin
  fatal: repository 'https://github.com/pybee/pybee.github.io/' not found
Done!

完整日志,see here.

我已经检查了Travis CI配置中的凭据以获取存储库;我尽可能确定他们是对的.我尝试使用相同的配置(在本地导出LEKTOR_DEPLOY_USERNAME和LEKTOR_DEPLOY_PASSWORD),它工作正常.

hammer:pybee.org rkm$lektor deploy ghpages-https
Deploying to ghpages-https
  Build cache: /Users/rkm/Library/Caches/Lektor/builds/a269cf944d4302f15f78a1dfb1602486
  Target: ghpages+https://pybee/pybee.github.io?cname=pybee.org
  Initialized empty Git repository in /Users/rkm/projects/beeware/pybee.org/temp/.deploytempOh4p98/scratch/.git/
  Fetching origin
  From https://github.com/pybee/pybee.github.io
   * [new branch]      master     -> origin/master
  On branch master
  Your branch is up-to-date with 'origin/master'.
  nothing to commit, working directory clean
  Everything up-to-date
Done!

有关此错误原因的任何建议?

最佳答案 事实证明这是一个
bug in Lektor.

如果您在< project> .lektorproject中使用以下内容:

[servers.ghpages-https]
target = ghpages+https://pybee/pybee.github.io?cname=pybee.org

以及.travis.yml中的以下内容:

language: python
python: 2.7
cache:
  directories:
    - $HOME/.cache/pip
    - $HOME/.cache/lektor/builds
install: "pip install git+https://github.com/singingwolfboy/lektor.git@fix-ghpages-https-deploy#egg=lektor"
script: "lektor build"
deploy:
  provider: script
  script: "lektor deploy ghpages-https"
  on:
    branch: lektor

(即,使用PR分支进行部署),构建将按预期进行部署.

点赞