cobyism/ghost-on-heroku

Improve documentation for making changes to a deployed Ghost blog

Closed this issue · 12 comments

holic commented

This line in the README doesn't actually work:

To make changes to your Ghost blog (like adding a theme to the /content directory, for instance), clone your blog locally using the Heroku Toolbelt:

 heroku git:clone --app YOURAPPNAME

See #62 and #67 for context. From Heroku support:

Recent changes are such that heroku git:clone is only useful for applications that are deployed with Heroku's hosted git service. In effect this means that applications deployed via GitHub, DropBox or "Deploy to Heroku" buttons will result in an empty repo when cloned.

In that case, you'll need to download the source repository and add the heroku remote to that repo. Once you've done that you can push with git (git push heroku master) and you'll be able to clone the repo after that.

Pretty bad/inconsistent user experience, but out of our control. We should update the docs to explain a working approach.

Wow, that seems silly.

I found your pull instructions for updating were sufficient to clone the repo.

holic commented

@Dreyfuzz What version of the Heroku CLI are you using? When did you originally deploy your Ghost blog? Have you previously made and pushed any modifications to the Ghost blog?

I just tested this with a brand new app and confirmed that the message was:

warning: You appear to have cloned an empty repository.

I just set it up. I got that message when I first attempted to clone it, then immediately followed the update instructions to pull and ran a push.

Any updates on this? I just tried the one click install and get that same error when cloning.

holic commented

I was told a "fix is coming": https://twitter.com/HunterLoftis/status/739577997171265537

I'll update the README in the meantime.

@Reclad The instructions in that link are exactly the same that are provided here for updating.

heroku git:clone --app YOURAPPNAME && cd YOURAPPNAME
git remote add origin https://github.com/cobyism/ghost-on-heroku
git pull origin master # may trigger a few merge conflicts, depending on how long since last update
git push heroku master

Thanks for the link btw.

I've found it easier to do this "backwards": clone from GitHub and then add a remote for Heroku.

Thanks for the link, @Dreyfuzz. Their instructions there basically seem to boil down to "Add the original repo as a remote and pull from that", which isn’t really a good solution since pulling from the GitHub remote might pull down an updated version of the codebase rather than what was deployed to Heroku. It’s really frustrating that platform deploys (i.e. using the deploy button) cause this to be a problem. 😞