Hi @marksouthee
Interesting, this came up for someone else recently as well. I’ve made a note to look into this missing git issue so I can update the tutorial if needed. However, for now at least it’s an easy fix. Adding the following step as the first step in the deploy section should do the trick.
Hi @ArjenSchwarz
In build step it says: ERROR: 2015/11/01 Unable to find static directory for theme hyde-y in /pipeline/source/themes/hyde-y/static
Does your app support git submodules? Because themes/hyde-y in my project is a git submodule.
Hi @GlacJAY,
By default Wercker doesn’t pull in git submodules, so you will have to do that manually. They have a description of how that works in their documentation on http://devcenter.wercker.com/docs/git/submodules.html. If you add the steps they show there before the hugo build step in your wrecker.yml file it should have the submodule included when hugo tries to build the site. I hope that helps, and let me know how you fared.
Hi @marksouthee,
Ah, of course, I should have realised that earlier when you mentioned your domain name. The github pages deploy step being used in the tutorial is for project level github pages only. For some strange reason personal github pages (the ones based on your username) work differently. The deployment step did what it’s supposed to do, as there is now a gh-pages branch in your repository.
However, as you need it to be in your other repository you will need to replace the github deployment step with the one below. That should push it to the repository where you want it.
It is possible that you will need to add the git and ssh-client tools again, but I suggest you try it without first.
- leipert/git-push:
gh_oauth: $GIT_TOKEN
repo: marksou/marksou.github.io
branch: master
basedir: public
Hi @ArjenSchwarz,
I did have to add the git ssh client back in to get it to deploy. I now have a site build in my github pages repo, but the index.html file is empty. I guess there is something else missing?
Hi @marksouthee,
I suspect this will be the last thing :). The issue here isn’t actually with the deployment as I got the same problem when I did a checkout of your code and tried to build it on my local. Your repository is missing most of the files for your theme. You will either need all files from there added to your github repo or add it as a submodule (in which case you can follow the steps detailed in http://devcenter.wercker.com/docs/git/submodules.html to have it pulled in by wercker).
Hi @ArjenSchwarz,
That is very strange, it looks like Git hasn’t committed the contents of the themes\hugo-creative-theme folder within my local repo. Will have to see what has happened. Only thing in my .gitignore is the /public folder!
Hi @ArjenSchwarz,
I decided to start from scratch to get a clean build. The Wercker build is failing at the Hugo Build step. The error message is very long. Shall I post it here or can I email it to you? My repo is marksou/lifecoach
Is there any way to set up this workflow to use a dev version of Hugo? There are features in 1.5dev that we would really like to be able to use, but we are using this as our publish workflow
Hi @mattstratton, as 0.15 was released last week you might not need it anymore but as of today it is indeed possible to use the latest development version of Hugo by setting the version in the Wercker step to “HEAD”.
Additionally, the step will now use 0.15 as the default version so you can use the released version if you prefer.
Hi @mattstratton, my apologies for breaking your old setup. The script now installs some more dependencies by default and I hadn’t properly tested it on the non-Docker way of doing things. The step has been fixed now to work there as well, but it’s good to know that you already fixed your own project by changing to the Docker set up.
HI @ArjenSchwarz, I wonder if you’ve had this issue:
It seems like my public folder is being thrown away before the deploy step.
I incorporated an ls step after the build and before the deploy and sure enough, after build public/ contains everything I’d expect. The ls step before deploy shows no public folder at all.
I’m using the docker stack btw.
Any thoughts? My understanding was that wercker was supposed to maintain the output of build for the deploy step.
Here’s my wercker file:
box: debian
build:
steps:
- arjen/hugo-build:
version: "0.15"
theme: nardocs
flags: --buildDrafts=true --verbose
- script:
name: ls stuff
code: |
ls -haltr /pipeline/source/public
deploy:
steps:
- script:
name: ls stuff
code: |
ls -haltr /pipeline/source
here’s the contents of the /pipeline/source/public after build
drwxr-xr-x. 2 root root 4.0K Jan 16 19:01 images
-rw-r--r--. 1 root root 0 Jan 16 19:01 .gitinclude
-rw-r--r--. 1 root root 1.9K Jan 16 19:01 hugo.png
drwxr-xr-x. 2 root root 4.0K Jan 16 19:01 fonts
-rw-r--r--. 1 root root 7.3K Jan 16 19:01 favicon.ico
drwxr-xr-x. 2 root root 4.0K Jan 16 19:01 css
drwxr-xr-x. 2 root root 4.0K Jan 16 19:01 js
drwxr-xr-x. 8 root root 4.0K Jan 16 19:02 ..
drwxr-xr-x. 3 root root 4.0K Jan 16 19:02 minutes
drwxr-xr-x. 2 root root 4.0K Jan 16 19:02 about
drwxr-xr-x. 3 root root 4.0K Jan 16 19:02 subdir_2
drwxr-xr-x. 2 root root 4.0K Jan 16 19:02 glossary
drwxr-xr-x. 2 root root 4.0K Jan 16 19:02 metadocs
drwxr-xr-x. 5 root root 4.0K Jan 16 19:02 subdir_1
drwxr-xr-x. 2 root root 4.0K Jan 16 19:02 style
drwxr-xr-x. 7 root root 4.0K Jan 16 19:02 subdir_3
-rw-r--r--. 1 root root 22K Jan 16 19:02 index.html
-rw-r--r--. 1 root root 31K Jan 16 19:02 index.xml
-rw-r--r--. 1 root root 12K Jan 16 19:02 404.html
-rw-r--r--. 1 root root 1.8K Jan 16 19:02 sitemap.xml
drwxr-xr-x. 14 root root 4.0K Jan 16 19:02 .
now here’s the parent folder during the deploy step:
-rw-r--r--. 1 root root 653 Jan 16 19:02 config.yaml
-rwxr-xr-x. 1 root root 247 Jan 16 19:02 README.md
-rw-r--r--. 1 root root 198 Jan 16 19:02 .gitignore
drwxr-xr-x. 7 root root 4.0K Jan 16 19:02 .git
drwxr-xr-x. 3 root root 4.0K Jan 16 19:02 themes
drwxr-xr-x. 3 root root 4.0K Jan 16 19:02 static
drwxr-xr-x. 3 root root 4.0K Jan 16 19:02 layouts
drwxr-xr-x. 6 root root 4.0K Jan 16 19:02 content
-rw-r--r--. 1 root root 473 Jan 16 19:02 wercker.yml
drwxr-xr-x. 7 root root 4.0K Jan 16 19:02 .
drwxr-xr-x. 7 root root 4.0K Jan 16 19:02 ..
Hi @Matt_Reimer, I’m currently having the same problem and on the Wercker Slack I see the same issue being mentioned. It looks like there is an issue with Wercker not passing on the generated code to the deploy step. I don’t know yet if there’s anything we can do about it or if we’ll just have to wait. I’ll let you know once I know more.