2016-07-05 95 views
4

我有一個Lektor站點,我嘗試使用Travis CI trigger approach from the Lektor docs自動響應請求和提交進行部署。使用Travis CI將Lektor站點部署到Github頁面時出錯

Lektor配置從命令行工作正常。

特拉維斯建設啓動,並出現建立的網站沒有問題 - 但是當它到達的部署,日誌說以下內容:

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! 

有關此錯誤原因的任何建議嗎?

+0

也許嘗試使用GitHub回購個人訪問令牌?正如[Lektor文檔](https://www.getlektor.com/docs/deployment/travisci/#access-credentials)中提到的那樣,因爲它似乎與GitHub的身份驗證是失敗的地方。 或者,也許看看您是否可以增加部署命令的調試信息量。 – ocean

+0

我在日誌中發現的唯一區別是/在Travis回購結束時,有沒有可能這是您配置中的拼寫錯誤? – akalipetis

回答

2

原來這是一個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/[email protected]#egg=lektor" 
script: "lektor build" 
deploy: 
    provider: script 
    script: "lektor deploy ghpages-https" 
    on: 
    branch: lektor 

(即用於部署的PR分支),建立預期將部署。

+0

如果現在合併修復鏈接的問題得到解決,請考慮「接受」您自己的答案。 – kmonsoor

相關問題