Giter VIP home page Giter VIP logo

laravel-auto-deploy's Introduction

Laravel Autodeploy.

Save yourself the stress of ssh-ing into your server everything you make a push to your production or staging branch. Simply, have your servers, pick up the changes and run your deployment or update scripts. It is as simple as echo "Hello World. This package only works for Github version control systems.

Installation guide.

Require you having PHP and composer installed on your machine, and any Unix/Linux (or Mac) shell.

  • Require the latest version of the package with composer
composer require navari/laravel-auto-deploy
  • After installation, if you are using Laravel 7.0+, you can move on unto the next step, otherwise you will have to add the Service Provider manually. Open the file config/app.php and find the providers array. Add the line below to the end of the array:
Navari\LaraDeploy\AutoDeployServiceProvider::class,
  • You want to publish the configuration file (and maybe the auto deploy script we provide by default), run laravel artisan script
php artisan vendor:publish --tag=laradeploy

When ran, you will see two files created for you, the config/laradeploy.php and laradeploy.sh. You can delete or modify the laradeploy.sh if you have your own script to run anytime the server pull some changes from your repository.

You will look into config/laradeploy.php to change the default settings we put in there.

Configurations.

Note that any changes you will want to make will always go into the file config/laradeploy.php.

Web Hooks

We support one VCS for now, Github. Your setup webhook on either one will be listed in the routes array:

 'routes' => [
        'github' => 'github-webhook',
    ],

Email Notifications

If you want to get notified anytime the server(s) pick up changes from your repositories, you will have to change the subscribe key to true and list email (or some emails) to send notifications to, in the config file. You can list as many email as you want, and you can also change the template (view) that will be sent as email.

It is worthy to note that we leverage your Laravel SMTP settings, which means you must have configured your Mail settings working before enabling this feature.

Security

Guarding your Web hooks, simply means that you have set a default token to be identified with Github or Bitbucket request to your web hook endpoint on the server โ€” and we encourage this. It will limit the endpoint to only authorized party. If you have a SECRET_TOKEN set up, add them to your .env file as either:

GITHUB_DEPLOY_TOKEN=secret_token_xxxx

Any request made with mismatch token validation will be simply, rejected.

laravel-auto-deploy's People

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.