4

我有一个 Lektor 站点,我正在尝试使用Lektor 文档中的 Travis CI 触发方法自动部署该站点以响应拉取请求和提交。

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!

如需完整日志,请参见此处

我已经检查了存储库的 Travis CI 配置中的凭据;我尽可能肯定他们是正确的。我试过使用相同的配置(导出LEKTOR_DEPLOY_USERNAMELEKTOR_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!

关于这个错误的原因有什么建议吗?

4

1 回答 1

2

事实证明这是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 分支进行部署),构建将按预期进行部署。

于 2016-07-06T05:23:46.183 回答