Code Monkey home page Code Monkey logo

autodeploy's Introduction

Autodeploy

Autodeploy is a small and highly customizable CLI-Tool to automatically deploy your git repo and execute arbitrary commands/scripts after a specific git action (e.g. push, merge, ...) Currently only GitHub is supported.
logo

Installation

Using NPM

npm install @taschendieb/autodeploy -g

Using YARN

yarn global add @taschendieb/autodeploy

Usage

Go to "Settings" in your repository and add a webhook to your website/ip with port 1337 (example.com:1337). Subsequently check "Send me everything". The port can be changed in the configuration.

autodeploy deploy <giturl> <path> [name]

This will clone the repository into the specified path and register the webhook internally.

by default this will deploy your git repo after a push on master

For adding custom actions see the 'Customization' section

Finally run the server in listen mode:

autodeploy listen

or register the application to automatcally start on boot

autodeploy autostart

Configuration

Autodeploy was designed to be as flexible as possible. Therefore you can configure global settings and deployment actions via a JSON configuration. This file is located by default in "~/.autodeploy/config.json"

The Structure looks as follows:

{
    // This section is for application-wide configurations
    "settings": {
        "port": 1337 // port the server listens to
    },
    // Deployments are configured in this section
    "deployments": [
        {
            "name": "", // user-specified name
            "url": "", // url of repository
            "path": "", // path in filesystem
            "trigger": [
                {
                    "event": "push", // one of githubs webhook events
                    "branch": "master", // affected branch
                    // When trigger condition (event and branch matching) is true the following actions will be performed in the order they are listed
                    "actions": [
                        {
                            "name": "pull", // user-specified name for reference
                            "action": "git reset --hard origin/master && git pull" // shell commannd to execute
                        }
                    ]
                }
            ]
        }
    ]
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Authors

Hannes Burger

Cornelius Denninger

autodeploy's People

Contributors

burgha avatar colodenn avatar

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.