2017-08-24 6 views
1

トラビスCIを使ってJekyllサイトを構築し、Githubのgh-pagesブランチにプッシュしようとしています。それは機能していない、おそらく私は何をやっているのか分からない。tavis ci、jekyll、gh-pages:gh-pagesブランチにプッシュするように見えない

エラーは次のとおりです。
error: src refspec gh-pages does not match any.
error: failed to push some refs to 'https://github.com/jshwlkr/jshwlkr.info.git'

ここ.travis.yml:https://github.com/jshwlkr/jshwlkr.info/edit/master/.travis.yml

branches: 
    only: 
    - master 
language: node_js 
node_js: 
- '6' 
before_install: 
- rvm install 2.2.3 
- curl -o- -L https://yarnpkg.com/install.sh | bash 
before_script: 
- gem install bundler 
- bundle install 
- mkdir _site 
- git clone https://[email protected]/jshwlkr/jshwlkr.info.git -v --branch gh-pages _site 
- git status 

after_success: 
- cd _site 
- git config user.email "[email protected]" 
- git config user.name "jshwlkr" 
- git add --all 
- git status 
- git commit -a -m "Travis #$TRAVIS_BUILD_NUMBER" 
- git push --force origin gh-pages 
- bundle exec rake webmention 

ここで最後のビルド:https://travis-ci.org/jshwlkr/jshwlkr.info/builds/268142486

(私は最終的にどちらかのプッシュに行きますよ追加のサーバー、またはrsyncに接続することができます。これはそのコメントです。)

答えて

1

Travisは浅いクローンをチェックするので、ビルドVMのローカルコピーはon GitHubのブランチgh-pagesブランチを知らない。

git fetch --unshallow 

でブランチをフェッチしてからgit push …を実行してみてください。

また、GitHub Pages deployment providerをお試しください。いくつか報告されているバグはhttps://github.com/travis-ci/travis-ci/issues/7538https://github.com/travis-ci/travis-ci/issues/7562ですが、あなたのニーズに適しているかもしれません。

+0

'完全なリポジトリに--unshallowは意味がありません.'は返信です – jshwlkr

+0

デプロイメントプロバイダは動作しているようです!ありがとう。 – jshwlkr

関連する問題