首页 文章

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

提问于
浏览
4

我试图使用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 .

我尽可能确定他们已经尝试使用相同的配置(在本地导出 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!

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

1 回答

  • 2

    事实证明这是bug in Lektor .

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

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

    以及_621407中的以下内容:

    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分支进行部署),构建将按预期进行部署 .

相关问题