From 4ddac3246d7698dc550b7606b3584c0c984b071f Mon Sep 17 00:00:00 2001 From: dallmo <77032281+dallmo@users.noreply.github.com> Date: Sat, 30 Nov 2024 01:52:17 +0800 Subject: [PATCH] Update hosting-on-aws-amplify.md in the section `Hosting`, added instructions on how to modify `amplify.yml` - because i just tried myself and Amplify does failed to detect, and i have to manually adjust the build settings like these proposed content changes. --- .../hosting-on-aws-amplify.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/content/en/hosting-and-deployment/hosting-on-aws-amplify.md b/content/en/hosting-and-deployment/hosting-on-aws-amplify.md index 43d75312ae..5a4dbbb3a9 100644 --- a/content/en/hosting-and-deployment/hosting-on-aws-amplify.md +++ b/content/en/hosting-and-deployment/hosting-on-aws-amplify.md @@ -32,6 +32,28 @@ AWS Amplify is a combination of client library, CLI toolchain, and a Console for 1. Review your changes and then choose **Save and deploy**. The Amplify Console will pull code from your repository, build changes to the backend and frontend, and deploy your build artifacts at `https://master.unique-id.amplifyapp.com`. Bonus: Screenshots of your app on different devices to find layout issues. +1. In case Amplify failed to detect your config, either : + - inside the Amplify dashboard, on the left column, choose "Hosting > Build Settings", edit the file `amplify.yml`, by adding `/public` to `baseDirectory` ; or + - add a file named `amplify.yml` to override the build settings in Amplify ; + +1. the default `amplify.yml` ( with `baseDirectory` modifed ) looks like this : +``` +version: 1 +frontend: + phases: + # IMPORTANT - Please verify your build commands + build: + commands: [] + artifacts: + # IMPORTANT - Please verify your build output directory + baseDirectory: /public + files: + - '**/*' + cache: + paths: [] +``` + + ## Using a newer version of Hugo If you need to use a different, perhaps newer, version of Hugo than the version currently supported by AWS Amplify: