Joomla GitDeploy Extension

GitDeploy Plugin

Joomla GitDeploy Extension
# GitDeploy Plugin

This plugin allows to automaticly deploy changes from a git repo and is based on [KickDeploy](https://github.com/nielsnuebel/kickdeploy)

Features

This plugin allows to listen on github hooks and than deploy changes from a git repo.

Configuration

Initial setup the plugin

* [Download the latest version of the plugin](https://github.com/zero-24/plg_system_gitdeploy/releases/latest)
* Install the plugin using `Upload & Install`
* Enable the plugin `System - GitDeploy` from the plugin manager
* Register / Log into [github.com](https://github.com/login)
* Create an repo on [github.com](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/create-a-repo)
* Now go to your server and [clone that repo into a folder of your choice](https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/cloning-a-repository)
* Please make sure you have added the [remote repo](https://docs.github.com/en/free-pro-team@latest/github/using-git/adding-a-remote)
* Setup an [webhook for your repo on githunb.com](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/creating-webhooks)
* Set the `Payload URL` to `https://www.example.org?github=true&targetSite=examle.org` (targetSite is optional and will default to the current domain)
* Generate and enter an secret value only known by GitHub and you.
* Now go to the plugin options:
* `Git Path`: Please copy here the result of `which git` when you run that from your server.
* `Git Repo`: Please set the repo name here `octocat/hello-world`
* `Branch`: Please set the branch name you want to pull from
* `Remote`: Please set the name of the remote you configured
* `Use Hook-Secret` & `Hook-Secret`: Please enable this option and set the secret configured in the webhook
* `Run cd` & `cd Path`: You can enable this option when the git folder is not the root folder of joomla
* `Run git reset`: You can enable this option to run an git reset before pulling the changes
* Please switch to the `Notifications` tab in the options
* `Notifications`: You can enable notifications
* `Notifications Provider`: Please select an notification provider where we should the notification to.
* When you have selected we show you the fields we need to use that provider please set the correct data here.
* Plese save & close the plugin
* Now commit the inital code or change a file
* GitHub now sends you the webhook and the plugin executes git pull as well as sends you a notification.

Now the inital setup is completed.

Additional remarks

# Suggested .htaccess rule

When you git repo is directly accessible to the web i would suggest to deny the access to the .git folder via an .htaccess file

`RedirectMatch 404 /\.git`

# Customise the Notification Message

You can customise the notification message using language overrides of the following two language strings
`PLG_SYSTEM_GITDEPLOY_MESSAGE_BODY="The Github user @{pusherName} has pushed to {repoUrl} that changes have now been pulled into: {currentSite}.Here's a brief list of what has been changed:{commitsHtml}What follows is the output of the script:{gitOutput}Kind Regards, Github Webhook Endpoint"`
`PLG_SYSTEM_GITDEPLOY_MESSAGE_BODY_COMMITS_LINE="{commitMessage} (Added: {commitAdded} Modified: {commitModified} Removed: {commitRemoved} Commit: {commitUrl})"`

Please make sure that you only use the html `a`, `p`, `ul`, `li`, `strong`, `small`, `br` & `pre` tags as well as make sure the `title` attribute for links is the same as the infomation showed.

The following parameters are supported right now for the `PLG_SYSTEM_GITDEPLOY_MESSAGE_BODY` language string:

* `{pusherName}`: The github username that pushed the changes
* `{repoUrl}`: The URL to the github.com repo
* `{currentSite}`: The current site the changes get deployed to or the valud of the targetSite when configured
* `{commitsHtml}`: The generated commit lines
* `{gitOutput}`: The output of the git command we executed.

The following parameters are supported right now for the `PLG_SYSTEM_GITDEPLOY_MESSAGE_BODY_COMMITS_LINE` language string:

* `{commitMessage}`: The commit message for that commit
* `{commitAdded}`: The count of added lines
* `{commitModified}`: The count of modified lines
* `{commitRemoved}`: The count of removed lines
* `{commitUrl}`: The URL to the commit on github.com

Update Server

Please note that my update server only supports the latest version running the latest version of Joomla and atleast PHP 7.2.5.
Any other plugin version I may have added to the download section don't get updates using the update server.

Issues / Pull Requests

You have found an Issue, have a question or you would like to suggest changes regarding this extension?
[Open an issue in this repo](https://github.com/zero-24/plg_system_gitdeploy/issues/new) or submit a pull request with the proposed changes.

Translations

You want to translate this extension to your own language? Check out my [Crowdin Page for my Extensions](https://joomla.crowdin.com/zero-24) for more details. Feel free to [open an issue here](https://github.com/zero-24/plg_system_gitdeploy/issues/new) on any question that comes up.

How to install Joomla GitDeploy Extension

You can install Joomla GitDeploy Extension via Joomla Installer.

Follow the steps below:

  1. Download the Joomla GitDeploy Extension package from the official website.
  2. Login to your Joomla website's administrator dashboard.
  3. Go to the "Extensions" tab and select "Manage" from the drop-down menu.
  4. Click on the "Upload Package File" tab and select the Joomla GitDeploy Extension package that you downloaded.
  5. Click the "Upload & Install" button to install the extension.
  6. You will see a confirmation message when the installation is complete.

That's it! You can now use Joomla GitDeploy Extension on your Joomla website.

Joomla GitDeploy Language Files

Is Joomla GitDeploy not available in your language?

We understand that not all extensions come equipped with language files, which can make it difficult for non-English speakers to fully utilize them. That's where our Language File Creation service comes in.

Great news!

ExtensionPlazza has now introduced a new feature to help Joomla users worldwide:

With our Joomla Extension Translation Tool, you no longer have to worry about language barriers preventing you from using the Joomla extensions you need. Our tool allows you to easily translate Joomla GitDeploy Language Files to any language you require, making it easier than ever before to use Joomla extensions in your preferred language.

Joomla GitDeploy Extension Customization

Do you need Joomla GitDeploy to do more than what it currently offers? Our expert team can help you extend or customize Joomla GitDeploy to meet your specific needs and requirements.

At ExtensionPlazza, we specialize in Joomla extension development and customization, and we are committed to providing exceptional services to our clients. We have extensive experience working with Joomla and related technologies, and we can help you create a solution that is tailored to your unique business requirements.

Whether you need a

  • custom integration,
  • additional features,
  • or a complete overhaul of the extension
we are here to help. We will work closely with you to understand your needs and requirements and develop a solution that exceeds your expectations.

Contact us today to learn more about our extension customization and extension development services, and how we can help you take your project to the next level.

You can reach us through the following channels:

Free Extension of September 2024

Each month, ExtensionPlazza brings you a Premium Joomla Extension developed by ExtensionPlazza exclusively for our valued visitors
Get the download link to your email inbox right now!

Extension Specifications

Current Version
1.0.2
Created on
29 October 2020
Last updated on
18 March 2024
Compatibility
Joomla 3,Joomla 4
Extension Type
Plugin
Free or Premium
Free Joomla Extension
Listed in
Joomla Site Management Extensions
Developed by
Tobias Zulauf

Score

No reviews for this extension yet.

Spread the Word