Plugin for automatically pushing content to git & deploying code changes

Hey there Kirby community!
I’ve been doing some freelance developer work for a client (designer) who wanted their site to run on Kirby v3. As a part of that, I had to find a way to automatically commit and push content-changes from the server back to the git repository of the website.

I solved this by writing a plugin that ties into Kirby’s hooks for content changes. While I was at it, I also added a little auto-deploy that would automatically download and deploy changes made to the site’s code whenever they’re pushed to the git repo (via GitHub webhooks).

I was wondering if this kind of plugin could be useful to anyone else here and whether I should take the time to properly package it up and push it out for others to use?

There doesn’t seem to be something solving this issue quite like this (only thing I found is a plugin that requires some more git-voodoo where content & “code” live in separate git repos), so is there any interest here or are you all just not running into this problem?

Any feedback would be much appreciated. Have a nice Sunday everyone! :blush:

10 Likes

I would loooove for such a plug-in to exist! :slight_smile:

following

So I guess I’ll build this out into a production-ready plugin over the next week. :sweat_smile:

I’m considering to turn it into a commercial plugin actually, because, at least in my mind, it’ll solve a problem that’s such a PITA that $10 (after a free non-limited trial, just like Kirby itself) for a liftime license shouldn’t be too much to ask, right?

Here’s the full 1.0 feature list I’m planning right now:

  • Automatically push changes to git (using the server’s git binary)
  • Offer the ability to have the pushing done via cron job (using either straight cron or the Kirby queue / janitor plugins)
  • Automatically deploy changes from git to the server
  • Support for GitHub, GitLab and BitBucket webhooks for the above
  • Also supporting hooking custom code into the deploy process
  • E-Mail notifications for successful deploys & errors
4 Likes

any news on this? :~)

The plugin works in principal and I’m using it in production for two of my sites already. There’s just a bunch of work left to do to test this for most configurations + write proper and useful documentation for how to set this up and use it correctly.

It’s still in development as my side project but, since you very much can destroy your entire site if I screw up some git commands in the plugin, I’d like to be careful and only release it once it’s properly tested.

3 Likes

Last week I made a plugin that allows you to work with Git from the panel. We’re already using it as a deployment system for two of our websites and it works great. Perhaps it’s suitable for what you guys are after? I’m letting it out in the open today, check it:

2 Likes