CSS generation from SCSS works locally but breakers in CI/CD

Generating the css files work fine locally but when I push the changed so as to deploy it the pipeline fails with the following error:

execute of template failed: template: partials/head.html:31:51: executing "partials/head.html" at <toCSS>: error calling toCSS: type <nil> not supported in Resource transformations

The full log: pages (#1432899613) · Jobs · Abraham Raji / gruvhugo · GitLab
The html: layouts/partials/head.html · master · Abraham Raji / gruvhugo · GitLab

  • The scss file is /assets/sass/main.scss
  • I am using the latest version of Hugo extended both on my local machine and the CI/CD

You execute hugo under <repo>/test dir.
You forgot to copy <repo>/assets/* to <repo>/test dir.

.gitlab-ci.yml

...
    - hugo new site test && cd test
    - mkdir themes/gruvhugo 
    - cp -r ../archetypes themes/gruvhugo
    - cp -r ../exampleSite themes/gruvhugo 
    - cp -r ../layouts themes/gruvhugo
    - cp ../LICENSE.md themes/gruvhugo
    - cp ../README.md themes/gruvhugo
    - cp -r ../static themes/gruvhugo
    - cp ../theme.toml themes/gruvhugo
    - rm -rf ../content && cp -r themes/gruvhugo/exampleSite/content/ . 
    - rm config.toml && cp themes/gruvhugo/exampleSite/deploy.toml ./config.toml 
    - mkdir static/img && cp themes/gruvhugo/static/img/logo.png static/img
    - hugo

...

Oops my bad. Thanks for pointing out.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.