521

Product support

Get help in the plugin support forum.

  • Added on Sep 10, 2019
  • Current version: 1.0.1
  • Platform Compatibility
    v3.x not tested
    v2.x not tested
    v1.x use latest
  • Created by
  • Public repository

Categories

This is a plugin that help you to automate every git push into your server. You can create custom script to run the deployment process.

Supported Providers

  • Bitbucket
  • GitHub (coming soon)
  • GitLab (coming soon)

License

The OctoberCMS platform is open-sourced software licensed under the MIT license.

Usage

Create your custom script named deploy.sh on your project directory.

#!/bin/sh

# Activate maintenance mode
php artisan down

# Update source code
git pull
git submodule init
git submodule update

# Update PHP dependencies
composer install --no-interaction --no-dev --prefer-dist

# Update plugins
php artisan october:up

# Restart the queue worker (if any)
php artisan queue:restart

# Update front-end dependencies
yarn install

# Touch main assets
touch themes/my-theme/assets/scss/app.scss

# Clear cache
php artisan cache:clear

# stop maintenance mode
php artisan up

Set the .env configuration.

GIT_DEPLOY_KEY=randomstringhere
GIT_DEPLOY_PROVIDER=bitbucket
GIT_DEPLOY_BRANCH=master

Set the webhook on your git repository provider.

Bitbucket

  1. On your repository open Settings > Webhooks.
  2. Click Add Webhook, set the title for example "Deployment".
  3. Set the URL to https://example.com/deploy?key=randomstringhere. Don't forget to change the domain and the key.
  4. Click Save.

GitHub

Coming Soon

GitLab

Coming Soon

1.0.1

First version of Deploy

Sep 10, 2019