There are several ways to auto deploy applications from git repositories like Github and GitLab.
You can use GitLab webhooks, AWS Lambda and S3. GitLab Webhooks notify AWS Lambda as soon as updates are made to your repository. AWS Lambda will then send the updates to S3. You will also configure EC2 cron jobs to regularly pull code updates from the S3 bucket.
Alternatively you can create a Continuous Delivery Pipeline using GitHub/GitLab, AWS CodePipeline, and AWS CodeDeploy.