AWS Codebuild - HUGO not generating CSS folders

Hi. I have a very simple site using the Hugo Agency theme set up with an AWS Codepipeline that takes the code from GitHub and does a hugo build in CodeBuild before moving the site to S3.

It nearly works but not quite and I’d appreciate some thoughts from those of you that may have done this before.

The base principles work fine and the site renders perfectly using hugo server.

However, when CodeBuild calls the hugo command, there are a number of directories that are not generated (see comparison between the directory structures below)

Local (I have removed most filenames from the directories) (total of 9 regular pages, 8 other pages and 1 non-page file generated - this is the same number in CodeBuild as well for the record).
Public
│ 404.html
│ favicon.ico
│ index.html
│ index.xml
│ local.txt
│ sitemap.xml

├───categories
│ index.xml

├───css
│ │ agency.css
│ │
│ ├───bootstrap-v3.3.7
│ │ bootstrap.css
│ │ bootstrap.min.css
│ │
│ └───jquery.form-validator-v2.3.44
│ theme-default.css
│ theme-default.min.css

├───data
│ └───projects

├───font-awesome-v4.7.0
│ ├───css
│ │ font-awesome.css
│ │ font-awesome.min.css
│ │
│ └───fonts

├───fonts
│ └───bootstrap-v3.3.7│
├───img
│ │
│ ├───404
│ │
│ ├───about
│ │
│ ├───logos
│ │
│ ├───portfolio
│ │
│ └───team

├───index
│ index.xml

├───js
│ │ agency.js
│ │
│ ├───bootstrap-v3.3.7
│ │
│ ├───jquery-v3.3.1
│ │
│ └───jquery.form-validator-v2.3.44

└───tags
index.xml

When hugo is run on Ubuntu 14.04 through AWS CodeBuild - and I get the following structure

Codebuild
│ 404.html
│ index.html
│ index.xml
│ sitemap.xml

├───categories
│ index.xml

├───data
│ └───projects

├───img
│ │
│ ├───404
│ │
│ ├───about
│ │
│ ├───logos
│ │
│ ├───portfolio
│ │
│ └───team

├───index
│ index.xml

└───tags
index.xml

Ie: The following directories are not created

/CSS/
/fonts*
/js

I have read a couple of posts that would points towards the baseurl being incorrectly defined but this does give a full and valid path to the css folders - they just don’t seem to be generated.

Any clever ideas? Thanks.

Right - managed to fix this but it turned out to be something different than what I thought would be the problem.

When I cloned the original theme from GitHub, it obviously came with a .git folder in the themes/‘theme’ folder and this turned out to be the root of the problem. When I committed my code, GitHub then saw this folder as an improperly registered Git submodule and hence the theme folders basically weren’t accessible to the build process.

I cleaned up the folders (by removing the whole themes folder from Git, committing this change, then deleting the .git subfolder and re-add the the themes folder) and the theme files are now in working order and the CSS, Fonts etc are now rendering fine.

So - note to self - when installing a theme, I’d want to remote the .git folder from the theme before committing or alternatively correctly registering the theme as a submodule.

Now. Coffee.