You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository is an example of how to deploy the "Hello, World" of probot apps to [AWS Lambda](https://aws.amazon.com/lambda/) using [serverless](https://www.serverless.com/).
3
+
This repository is an example of how to deploy the "Hello, World" of probot apps to [AWS Lambda](https://aws.amazon.com/lambda/) using [aws sam](https://aws.amazon.com/serverless/sam/).
4
4
5
5
## Local setup
6
6
@@ -19,26 +19,27 @@ npm start
19
19
Follow the instructions to register a new GitHub app.
20
20
21
21
## Deployment
22
-
23
-
In order to deploy the app from you local environment, follow the [Serverless user guide for AWS](https://www.serverless.com/framework/docs/providers/aws/guide/quick-start/).
24
-
25
-
If you use this example as a template, make sure to update [`serverless.yml`](serverless.yml) and set new values for
26
-
27
-
-`service`
28
-
-`app`
29
-
-`org`
30
-
31
-
Make sure to create the following parameters on [https://app.serverless.com](https://app.serverless.com):
32
-
22
+
Get the following details about your GitHub app:
33
23
-`APP_ID`
34
-
-`PRIVATE_KEY`
35
24
-`WEBHOOK_SECRET`
25
+
-`PRIVATE_KEY`
36
26
37
-
For continuous deployment via GitHub action, copy [this repository's deploy workflow](.github/workflows/deploy.yml) and create the following secrets:
27
+
1. Setup your aws cli creds
28
+
1. set your aws profile by running `export AWS_PROFILE=<profile>`
29
+
1. run `sam build`
30
+
1. run `sam deploy --guided`
38
31
39
-
1.`SERVERLESS_ACCESS_KEY` - You can create a Serverless access key at `https://app.serverless.com/<your org>/settings/accessKeys`
40
-
2.`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` - you will likely find your AWS credentials in `~/.aws/credentials`
32
+
Subsequent deploys to the same stack to the default environment...
33
+
1. run `sam build`
34
+
1. run `sam deploy`
41
35
36
+
## Debugging locally
37
+
1. Populate the values in vars.json with the ones specific for your GitHub app. For the `PRIVATE_KEY` replace newlines with `\\n` to make the string value a single line.
38
+
1. run `sam build`
39
+
1. Run sam local via bash...
40
+
```
41
+
sam local invoke -d 9999 webhooks -n vars.json -e events/event.json
0 commit comments