I met the same problem in travisCI building, following is my solution:
Modify the .travis.yml file:
From:
install:
- go get -u -v github.com/spf13/hugo
script:
- hugo
To
install:
- go get -u -v github.com/kardianos/govendor
- go get -u -v github.com/spf13/hugo
- cd $GOPATH/src/github.com/spf13/hugo && govendor sync && go install
script:
- cd $HOME/gopath/src/github.com/YourBlogName/YourBlogName.github.io && hugo
Hope this will help you.