Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oscard0m/probot-aws-serverless-probot-example
https://github.com/oscard0m/probot-aws-serverless-probot-example
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/oscard0m/probot-aws-serverless-probot-example
- Owner: oscard0m
- License: isc
- Created: 2022-08-24T15:42:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-26T17:50:02.000Z (almost 2 years ago)
- Last Synced: 2024-11-10T14:14:46.609Z (about 2 months ago)
- Language: JavaScript
- Size: 233 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Probot & AWS Lambda example
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/).
## Local setup
Install dependencies
```
npm install
```Start the server
```
npm start
```Follow the instructions to register a new GitHub app.
## Deployment
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/).
If you use this example as a template, make sure to update [`serverless.yml`](serverless.yml) and set new values for
- `service`
- `app`
- `org`Make sure to create the following parameters on [https://app.serverless.com](https://app.serverless.com):
- `APP_ID`
- `PRIVATE_KEY`
- `WEBHOOK_SECRET`For continuous deployment via GitHub action, copy [this repository's deploy workflow](.github/workflows/deploy.yml) and create the following secrets:
1. `SERVERLESS_ACCESS_KEY` - You can create a Serverless access key at `https://app.serverless.com//settings/accessKeys`
2. `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` - you will likely find your AWS credentials in `~/.aws/credentials`### Debug via unit tests
1. Intall nyc and mocha: `npm install -g nyc mocha`
1. From the VSCode `RUN AND DEBUG` menu select `Mocha` and click the green arrow to start debugging.### Debug by launching probot locally and sending it a payload
1. Point your GitHub app to your local using something like smee.io
1. 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.
1. From the VSCode `RUN AND DEBUG` menu select `Launch Probot` and click the green arrow to start debugging.## License
[ISC](LICENSE)