Best workflow for a custom theme + managed Ghost install?

#1

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?

0 Likes

#2

@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: https://github.com/TryGhost/Casper/blob/master/gulpfile.js#L58-L80

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

0 Likes

#3

@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:

0 Likes

#4

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