Help with error when setting up deployment pipeline - Travis-ci


#1

Hello all,

I got the following error when building my site in Travis. Do you know what that error means?

I have the content directory in my theme folder with a .gitkeep file in it and one the main directory of my project too.

See screenshot or error message in Travis below.

Should there be something in the /content folder?

Would appreciate any help here.

Ben


#2

Please read Requesting Help, and post a code repo. We can not troubleshoot this issue from a screenshot anymore than it takes you to copy and paste the error and search for it abroad.

Also, you might search for that error and find a Travis-CI specific space to find answers.


#3

Thanks for the advice @maiki

I am using the hugo-creative-theme and have searched for similar issues without any luck.
The error I get is as follows:

Error: Error building site: No source directory found, expecting to find it at /home/travis/gopath/src/github.com/jamestagal/awesome-static-site/content

Here is the link to my repro:

https://github.com/jamestagal/awesome-static-site

Let me know if any other information is useful.

Best regards,
Ben


#4

Probably. Have you tried adding a content directory? I can’t find any implicit requirement, but the Hugo model is to convert content into HTML, so it is possible it requires it. One way to find out…

I don’t know much about Travis config files, but all the examples I’ve seen for building Hugo sites don’t use external scripts. Your make file can probably be added in travis.yml, something like:

script:
  - rm -rf public
  - hugo

#5

Thanks for that. yes i just needed to add a .gitkeep file in the empty content folder and now it builds. Thanks again.