Deploying theme is not taking effect on production

Hi,

We’ve made some changes to a theme and pushed the changes to our Github repo successfully. We’ve connected this repo to our Ghost setting following this instruction: Deploy Ghost Theme · Actions · GitHub Marketplace · GitHub. Github actions is reporting that the deployment is successful, but it’s not taking any effect on production site. What are we doing wrong here?

Thanks,
Arif

The first time you use the action, you need to activate it in the admin panel. (Ghost> settings > design > customize > change theme > installed themes)

After that, future pushes will be live in seconds.

Ah… I see. I didn’t notice that an inactive theme was actually pulling the changes. Thanks for the info Cathy. But there’s a new issue!

Now that I’ve activated the theme (which is connected with Github), it says that the app.min.css?v=… and app.min.js?v=… files are missing in assets/dist folder. I ran the command npm run build to see if it makes any changes. But it doesn’t. What should I do now? Thanks in advance.

Sounds like you’re missing a build step. How the theme is built is theme specific, so you’re going to need to post more information. Package.json should define what npm run build actually does – see what that says, and also take a look for another build/deploy-sounding command in the file.

Also check that your .gitignore isn’t excluding files in dist – it might be!

Hey Cathy, thanks! npm run build actually runs the script gulp build. But you’re right. Gitignore is the culprit! It was ignoring dist/* and /assets/dist/*. Screenshot attached. I’ll try pushing again now. Let me know if I should do anything else with the gitignore file. Thanks!!

image

1 Like

Nothing jumps out at me. :) Try it and see if it works! :)

It works as it should! Thanks :slight_smile:

1 Like