Hi,
This question is a little about “best practices”. And I’m not sure if deploys is the correct subsection.
I’ve got to this interesting thread: How does Trellis deploy a gulp-based theme like Sage? and this other one: Help deploying and building my sage theme from git
And I think both adress exactly the same issue I’m having but I think I’m missing something basic because I’m new to all the automation stuff and I used to FTP stuff until recently.
I have a full roots stack and I’m working on it locally. I’ve created a fork of sage so the theme I want to deploy is on github.
I have composer dependencies both on the site/composer.json and path-to-theme/composer.json. (Not sure which dependencies to put where but that is secondary right now)
As I followed the project exemple my theme is isntalled locally via git clone so it’s not a dependency of anything.
Now I got to the point I want to push everything to staging and the ansible and deploy scripts work great.
Right now I got a default template site on staging.
I have the following questions about this process:
-
Should I make my theme a dependency of this website?
this is the way I would feel most natural. I guess this way the deploy would pull the template from github. But I’ve seen on the linked threads that this would not run all the steps to build the theme.
In case this is the best way:
1.1. How should I indicate composer that a particular dependency that I am defining from github is a theme and so should be installed in the themes directory?
1.2. How should I build the theme? I’ve read form the linked threads that I should not ssh to the server and build them. -
Should I push my local build of the theme?
That would be totally new for me. Could you please point me in which way to search for documentation on this? -
Should I clone the theme from github?
3.1. locally? and coping?
3.2. SSHing?
I guess I’m missing some tutorial that adresses deploying theme but I did not find it on deploys documentation of trellis nor in the example project
Thanks a lot!