GithubHelp home page GithubHelp logo

serverless-automation-github's Introduction

serverless-automation-github

Setup

Before diving in the actual code, you’ll have to set up your Serverless environment. You first need to install Serverless as a global dependency:

npm install -g serverless

&&

npm install

Next, you’ll need to install the AWS CLI tool, that will later be used by Serverless to manage all your resources.

Once installed, you’ll have to create an AWS user for Serverless and generate keys for it. Please refer to this section of the official guide.

Now that you have your keys, we can configure Serverless to access AWS on your behalf:

serverless configure credentials \
    --provider aws \
    --key <access-key-id> \
    --secret <secret-access-key> \
    --profile serverless-admin

This creates an ~/.aws/credentials file containing your keys under a profile named serverless-admin.

Also you should generate a github token, and place it into env.json which will be used by Octokit.

Run

Run offline:

serverless offline start

curl -X POST http://localhost:3000/webhook

In the Cloud:

# Deploy all your stack
serverless deploy

# Deploy a single function (a lot faster)
serverless deploy --function hello

# Test it
curl -X POST https://<random-id>.execute-api.us-east-1.amazonaws.com/dev/webhook

Additionaly you will need to add webhook to your repository which can access to Issues section, and with payload URL of your running lambda instance.

serverless-automation-github's People

Contributors

samirhodzic avatar

Watchers

 avatar  avatar

serverless-automation-github's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.