Hugo build fails without clearing cache

Hi Serhat! Sorry - that should have worked but in fact that $NETLIFY_CACHE_DIR is somehow not set during your build so you are removing the root directory - including your just-built site! So even if it worked better - didn’t error out - your site would not deploy in a useful way.

We did some testing and this should work better as a build command for you:

git submodule update --force --init --recursive --depth=1 && hugo --gc --minify && rm -rf /opt/build/cache

Let me know how it goes!