Managing Kirby via Submodule, pushing submodule to remote (Dreamhost)

Hi everyone,

I’ve been working on getting my workflow for pushing my local copy of my (in-development) website up to my web host (DreamHost). I’ve followed their tutorial for doing this, and everything was working great. Until, that is, I decided I wanted to implement updates to my Kirby install using git submodules. Now, when I push my local copy to my web host, the site breaks. I couldn’t understand why. I wasn’t getting anything when trying to access the actual webpage (which is actually understandable, as I don’t have a template set up just yet), but I wasn’t getting anything. When I tried to access my panel, again, nothing. No errors, outside of a 500-level error. It wasn’t until I logged into the FTP interface of DreamHost did I realize that my kirby directory was empty, and so was the for the one plugin I had setup locally using submodules. So it seems as though there is a disconnect in how I am syncing my site to my remote server and how git handles the submodules. Would someone be able to point me in the right direction for getting this all to work? Maybe this setup isn’t a good one for using submodules?

Thanks for any help!

Submodules are not pushed to the remote, they live in their own repo and must be checked out on the server separately.

Thanks for the reply @texnixe. I was afraid of that. So I guess my workflow for adding and updating these submodules would be to just log into my remote server and pull the submodules in manually when I need to? I’m not sure what the best way forward is using this approach.

Either that or should be possible to automate that via a git hooks as well, but you need to read up on that, I haven’t worked with git submodules in a long time because I found them to be a pain.

Ugh, that is quickly becoming my perspective on them, too. I don’t think I want to go through the hassle of setting up a post commit hook for something like this, when it’s much simpler to do things the way I had been: download and replace the kirby directory locally and push the whole site up as one repo.