gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 03:30:33 27 4
gpt4 key购买 nike

我有一个 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_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!

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

最佳答案

原来这是一个 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 分支进行部署),构建将按预期部署。

关于travis-ci - 使用 Travis CI 将 Lektor 站点部署到 Github Pages 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38193922/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com