Roots Discourse

Deploy Specific Tasks/Tags

Hi y’all.

I hope this isn’t a silly or redundant question.

Sometimes I just make a small php change I want to deploy. Does the Trellis deployment workflow include “partial” deploys like the way we use --tags to partially provision?

Thanks.

I’m not sure I entirely understand the question. Are you asking if you can have Trellis deploy, say, a single PHP file in your theme? If that’s your question I’m pretty sure the answer is no: Trellis deploys the theme more or less whole-hog, by symlinking the new deploy to the current directory. It doesn’t really “reach into” that directory and change individual files.

What is the use-case for this particular need? Deploys are generally very safe to run repeatedly, so if you want to change a single file then change the file, commit it to your repo, and run a deploy.

1 Like

Ha ha. Thanks, man. I’m not that green as to think it would deploy a single file into current.

It sounds like the general practice is to run all of the deployment tasks even if, for example, none of the assets actually need to be recompiled or updated.

Is that accurate?

I suppose it’s de facto general practice since that’s what Trellis does by default? You could modify what tasks are run on a deploy, but since (apart from the things in shared) everything is packaged into a single directory, I feel like things might break if you tried to not regenerate/compile/etc certain things on some deploys but not on others. It seems like you’d be adding a lot of complexity that you’d then have to handle in another way. I’m still not sure what the problem you’re trying to solve here is. If you could explain why you want to do this we might be able to give you a better answer.

1 Like

Great point. The point would be just to make deployment faster. Mostly I just wanted to make sure I wasn’t missing an option.