While trying to deploy one of my Hugo website using AWS Amplify , I had an issue while trying to continously deploy the website as AWS Amplify wasn’t able to detect which Framework I was using in my git repository.
The solution I’ve found was to enforce the installation of hugo binary in the build phase of the frontend.
Here below a sample of the yaml configuration I’ve used (here using Hugo = v0.86.0, adapt to your need)
version: 0.1
frontend:
phases:
build:
commands:
- wget https://github.com/gohugoio/hugo/releases/download/v0.86.0/hugo_extended_0.86.0_Linux-64bit.tar.gz
- tar -xf hugo_extended_0.86.0_Linux-64bit.tar.gz hugo
- mv hugo /usr/bin/hugo
- rm -rf hugo_extended_0.86.0_Linux-64bit.tar.gz
- hugo
artifacts:
baseDirectory: public
files:
- '**/*'
cache:
paths: []