Github Action - found no layout file for "HTML" for

Hello I don’t understand why I have these errors

Run hugo --config config.yaml
Building sites … WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/10/07 18:15:45 found no layout file for "JSON" for "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

I have encountered a similar error in the past, and what solved that problem was in fact the absence of variables essential to the proper functioning of the theme

Today I am trying to build my Hugo site from Github Action with this Workflow below:

name: Deploy

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    - name: Setup Hugo                           
      uses: peaceiris/actions-hugo@v2
      with:
        hugo-version: '0.62.0'

    - name: Build Hugo
      run: hugo --config config.yaml

    # Runs a set of commands using the runners shell
    - name: Create deploy.zip
      run: |
        mkdir cheatnote.grosot.fr
        cp -r public/* FOOBAR/
        zip -r deploy.zip FOOBAR/
    - name: Send deploy.zip with scp
      uses: appleboy/scp-action@master
      env:
        HOST: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
      with:
        source: "deploy.zip"
        target: "/var/www/"

    - name: Delete existing site and unzip deploy.zip
      uses: appleboy/ssh-action@master
      with:
        host: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
        script: cd /var/www/; rm -rf /var/www/FOOBAR/; unzip /var/www/deploy.zip

I tried several things:

  • I thought Hugo couldn’t find the config.yaml file, I did a ls -l and the file is there
  • I forced the use of the config.yaml file with --config config.yaml, but that doesn’t change anything either

I’ve found the cause

I added a theme with git submodule, and when Github action build there is the folder /theme//

So there must be a way to load the submodule cleanly, but currently I just solved by removing the submodule and adding the theme with a copy and paste of the folder

this dirty solution is enough for me

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