This repository is an example of how to deploy the "Hello, World" of probot apps to Netlify Functions.
Install dependencies
npm install
Start the server
npm start
Follow the instructions to register a new GitHub app.
You need to run npm start
at least once in order to register a new GitHub App for your local testing. It will create a .env
file with your app's credentials once it's done.
Install the Netlify Dev CLI
npm install --global netlify-cli
Then start it the root folder of this repository
netlify dev
In a new terminal app, start smee-client
in order to receive webhook event requests from GitHub
npx smee --url [WEBHOOK_PROXY_URL] --target http://127.0.0.1:8888/.netlify/functions/webhooks
Replace WEBHOOK_PROXY_URL
with the value of WEBHOOK_PROXY_URL
in your .env
file.
- Make sure you registered your GitHub App
- Fork this repository
- Sign in to your Netlify account, follow instructions at https://app.netlify.com/start
- In your GitHub App's settings, update the webhook URL to the netlify domain, e.g.
https://my-probot-app.netlify.app/.netlify/functions/webhooks
- Add environment variabbles in your Netlify's app's site settings ("Build & deploy" -> "Environment"):
APP_ID
,PRIVATE_KEY
(replace line breaks with\n
),WEBHOOK_SECRET
- Trigger a deploy so that the new environment variables take effect.