Ionic Android Build Workflow

After built my demo application, now I am thinking about publish the app and automate the build process. So far, all my build is done on my local machine but eventually I want to have a workflow so that I can:

  1. Commit my local change to GIT
  2. Trigger a pull on a remote EC2 instance
  3. Then my EC2 instance can automate the build process and build the unsigned APK file

So far #1 and #2 is achieved but I am not sure how to complete #3. Not sure how people normally do this so can someone shed some light on this?