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
serviceapporg
Make sure to create the following parameters on https://app.serverless.com:
APP_IDPRIVATE_KEYWEBHOOK_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/accessKeysAWS_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 DEBUGmenu selectMochaand 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_KEYreplace newlines with\\nto make the string value a single line. - From the VSCode
RUN AND DEBUGmenu selectLaunch Probotand click the green arrow to start debugging.