I am getting an error whenever I try automatic deployment with GitHub

not weird at all that manual and automatic deployments are differently behaving; they are 100% different processes:

  • automatic requires that we can build your site
  • manual requires that YOU can build your site and we never try to build anything

I’d take a step back and ensure that you can build locally from a CLEAN checkout of your repo, and confirm what version of hugo you are using locally and make sure ours is the same.

This article describes those and other “common” debugging processes which we’ll need you to try before our staff takes a swing at it in case they don’t help: