Skip to content

octobroid/oc-deploy-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Git Deployment Plugin for OctoberCMS

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

  • GitHub
  • Bitbucket
  • GitLab

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

License

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

About

Auto Deployment Plugin for OctoberCMS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages