Best workflow for a custom theme + managed Ghost install?

Hi folks,

My company recently switched from a self-hosted install to managed, as it’s easier to maintain.

We have a custom theme in a Github repo, and the current workflow is to commit changes into the repo, then re-zip up all the files and manually upload via the Ghost admin.

Is there a better way to do this?

@eliseb - I’m glad you asked! Yes, there really is. It’s possible to automate the zipping part with JS build tools aaaand the uploading part with our API.

We have a demo of the zipping part in Casper here: Casper/gulpfile.js at main · TryGhost/Casper · GitHub

I’ve been meaning to put together a demo of the uploading part for ages, so I’ll try to put something together.

@Hannah Nice - this is exactly what I needed, thanks! Super interested in the demo, let me know when I can check it out :slight_smile:

If you’re looking for somewhere to start, check out the v2 branch of Ghost Deploy:

The Ghost Javascript API doesn’t currently support activating a theme, so I haven’t published 2.0 to npm (since it’s a loss of functionality), but I think you might find the code useful :slight_smile:

I’ve been able to integrate it with gulp in a manner that will build, test and publish with one command. Let me know if you’re interested, and I’ll clean up + post a sample gulp file

1 Like