4

I've got a Lektor site that I'm trying to deploy automatically in response to pull requests and commits, using the Travis CI trigger approach from the Lektor docs.

The Lektor configuration works fine from the command line.

The Travis build starts, and appears to build the site without problem - but when it gets to deployment, the log says the following:

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!

For a full log, see here.

I've checked the credentials in the Travis CI configuration for the repository; I'm as certain as I can be that they're correct. I've tried using the same configuration (exporting LEKTOR_DEPLOY_USERNAME and LEKTOR_DEPLOY_PASSWORD locally), and it works fine.

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!

Any suggestions on the cause of this error?

freakboy3742
  • 1,026
  • 10
  • 15
  • Maybe try using a GitHub repo personal access token instead? As mentioned in the [Lektor docs](https://www.getlektor.com/docs/deployment/travisci/#access-credentials), as it seems like the authentication with GitHub is where it's failing. Or maybe see if you can ramp up the amount of debug info for the deployment command. – ocean Jul 05 '16 at 02:32
  • The only difference I spot in the logs is that / at the end of Travis repo, is there any chance this is a typo in your configuration? – akalipetis Jul 05 '16 at 07:33

1 Answers1

2

It turns out this is a bug in Lektor.

If you use the following in your <project>.lektorproject:

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

and the following in your .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

(i.e., use the PR branch for deployment), builds will deploy as expected.

freakboy3742
  • 1,026
  • 10
  • 15
  • if the linked bug is resolved as the fix is merged now, please consider `accept`-ing your own answer. – kmonsoor Aug 22 '16 at 15:23