This repository is an example of how to deploy the "Hello, World" of probot apps to AWS Lambda using serverless.
Install dependencies
npm install
Start the server
npm start
Follow the instructions to register a new GitHub app.
In order to deploy the app from you local environment, follow the Serverless user guide for AWS.
If you use this example as a template, make sure to update serverless.yml
and set new values for
service
app
org
Make sure to create the following parameters on https://app.serverless.com:
APP_ID
PRIVATE_KEY
WEBHOOK_SECRET
For continuous deployment via GitHub action, copy this repository's deploy workflow and create the following secrets:
SERVERLESS_ACCESS_KEY
- You can create a Serverless access key athttps://app.serverless.com/<your org>/settings/accessKeys
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
- you will likely find your AWS credentials in~/.aws/credentials
- Intall nyc and mocha:
npm install -g nyc mocha
- From the VSCode
RUN AND DEBUG
menu selectMocha
and click the green arrow to start debugging.
- Point your GitHub app to your local using something like smee.io
- Copy .env-sample to .env and populate with values specific for your GitHub app. For the
PRIVATE_KEY
replace newlines with\\n
to make the string value a single line. - From the VSCode
RUN AND DEBUG
menu selectLaunch Probot
and click the green arrow to start debugging.