Heroku hosted Ghost app not triggering rebuilds / deploys

I need advice to debug deploy Netlify App

I have Ghost installed on a heroku app - which I was hoping to be able to edit / add posts onto and then trigger a rebuild in netlify. I think I followed the instructions well but :man_shrugging::man_facepalming: - would appreciate any help please and thanks! If you need more info to help debug please let me know what I can do? Thanks - Zachary

hi Zachary,

I looked at your build log and you have quite a few errors in there relating to missing images, malformed filenames and such. That might be the reason it is not building as you expect. Have you looked at your log?

Hi Perry,

Thanks for getting back to me. Yes, I could see the missing images errors too.

I had exported blog posts (which must have included images) from a wordpress blog and then imported them into Ghost. When I spotted that the images were not loading correctly I tried to remove them all but I wasn’t sure exactly how to do this, as I couldn’t find where the files had uploaded to. The site is in a github repo, but I couldn’t seem to see it there.

I am going through those logs now to work out if I’ve left any images on the site still in the hopes that removing them will fix it.

Could you be more specific about the malformed file names please? How would I find and rectify those?

Thanks again - appreciate you getting back to me!

hey there, from the very bottom of your build log:

5:10:59 AM: Starting to deploy site from 'dist/'
5:10:59 AM: Failing build: Failed to deploy site
5:10:59 AM: failed during stage 'deploying site': Invalid filename 'assets/images/Z1JW54s-photo-1496861918188-975dd58b55b5?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=2000&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ'. Deployed filenames cannot contain # or ? characters
5:11:00 AM: Finished processing build request in 57.57703473s

Hi - thank you…

So I’m having trouble finding this file. I think it might just be from the imported zip file which I loaded into Ghost but I can’t find it anywhere.

I SSH’ed into the heroku install and did a ‘find . -name “photo*”’ command but I can’t find it anywhere. I also did an ‘npm update’ while in there in case that would help but it doesn’t.

When it says deploy site from ‘dist/’ do you know where it is referring to? There are lots of folders within the node_modules called dist - but I might be looking in completely the wrong place?

Thanks again!

You asked about “deploy site from ‘dist/’”- that is the “publish” directory and it’s coming from the netlify.toml file in the repo you’re working from:
https://github.com/zgparsons/zachary-eleventy-ghost/blob/master/netlify.toml

Different static site generators have different default directories that they write to, and Eleventy’s default seems to be dist/.

You can read more about the netlify.toml here:

As for the rest… were you able to get the initial deploy working with the “deploy to Netlify” button before integrating your own Ghost content- so that it was a static site on Netlify pulling from the demo site hard-coded in .env? And was your Ghost admin panel successfully set up on Heroku? Those two pieces are prerequisites for getting this working correctly. And then since you’re running into issues with the image names, I might try deleting the lazyImage plugin (or reading about how it works, depending on your troubleshooting style :grinning:)- but those image filenames definitely seem to be the culprit here:
https://github.com/zgparsons/zachary-eleventy-ghost/blob/223f4da11d903c9dd1f498e1b99bd19a2f742a8b/.eleventy.js#L7

Let us know how it goes and if we can help further!

1 Like

Hi Jen - Thank you for your help with this!

It worked! I removed reference to the lazyImage plugin and the site deployed straight away.

In answer to your questions - yep I had the initial deploy working fine, and I had a working Ghost admin panel on Heroku - this is why it was v frustrating to not be able to deploy properly.

Anyway - thank you for your help, taking the time to answer me, and your explanation about the ‘dist’ directory - I understand better now. Thank you,
Zachary

1 Like