tyson
tyson

Reputation: 35

Setup GitHub Webhook for AWS EC2 server

I have a web application deployed in an AWS EC2 instance. I recently learnt about GitHub Webhooks and I am now trying to setup a webhook service for my EC2 server.

I have two questions:

  1. How can I receive the webhook payload to a specific endpoint on my server?
  2. What will be the payload URL that I have to provide when setting up the GitHub webhook?

Upvotes: 2

Views: 2761

Answers (1)

vanadium23
vanadium23

Reputation: 3586

First you need to go to your repo, and click through this sequence:

Settings -> Webhooks & Services -> Add webhook

Then paste the url where github will submit data for each new commit. You can find examples of payload in example.

Then implement the logic needed in the backend to work with info about new commits.

Upvotes: 1

Related Questions