I've cobbled together a Github Actions workflow from different parts of the internet and brought it up to standards for 2024.
What it does is build your Flutter app that is target for the web after your main or dev branch receive a push.
Depending on which branch received the push, a different entry-point is used to build the Flutter app.
The resulting build/web folder is zipped and pushed back into the infrastructure/artifacts folder of the Git repository. This is useful because the monorepo that contains the Flutter app is also used as the home of CDK deployment rules.
Simply place the snippet below in a file called .github/workflows/build-deploy.yml in your git repo and commit and push it to the server.
Things to check before using the file:
update the root folder to whatever your code/<app_name>/ is
update the entry point to whatever you use; and
Make sure the flutter_version is the one you are using.
Find the gist here: https://gist.github.com/marnixk/a5f487aa92e3cab058e702e109a53b56