Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Multiple Stores Using Same Github Branch #3509

Open
skyproddev opened this issue Mar 1, 2024 · 15 comments
Open

[Feature]: Multiple Stores Using Same Github Branch #3509

skyproddev opened this issue Mar 1, 2024 · 15 comments
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues open for contributions theme bugs that won't be prioritized in the near future Type: Enhancement New feature or request

Comments

@skyproddev
Copy link

What area(s) will this request affect?

Deployment

What type of change do you want to see?

Substantial change to existing feature

Overview

As many people have found (see articles linked at the bottom) there are issues about running the same theme on multiple GitHub branches, for multiple stores. But that setup is a very common scenario for us devs.

The problem

The problem is simply summed up in that the theme's json files (that holds settings/customizations) will be individually altered by the integrated themes and pushed from Shopify to GitHub.
If I then push new code edits from my dev theme to the live branches, there will mostly be conflicts. Going through these conflicts individually is cumbersome, and prone to errors.
(For example: If the local json files have been altered while testing and developing, and there is no conflict, because develop is ahead of live branches — then the test settings are accidentally merged to live themes without conflict.)

The solutions suggested in the various articles come so close to an automated version, enabling us to ignore config/*json, templates/*json and locales/*json, but it doesn't quite land. I've spent hours trying to automate the flow for one client, but I reach a dead end each time I think I almost made it.

The solution

I have no specific suggestion as to how to solve it, but I first wanted to gauge the interest and see if this feature request gains some traction. And also by linking all the articles below, I want to highlight that this is an issue that many people have dived into deeply, without luck.

Maybe the solution would be something about how the Shopify GitHub integration interacts with .gitignore files. Maybe it would be something in the CLI itself. But this scenario is well worth a solution, since almost any international store benefits from this.

Conversations around this topic, which all lead to the same dead end (except maybe one very complex setup outside of the Shopify eco-system, which I have not personally tested):

Motivation

Trying to maintain and develop the same theme over multiple stores, using GitHub branches, without overriding settings pushed from the Shopify GitHub integration.

@skyproddev skyproddev added the Type: Enhancement New feature or request label Mar 1, 2024
@skyproddev
Copy link
Author

Right after I published this, I found a fantastic GitHub action written for this very purpose:
https://github.com/Jamiemccleave/shopify-multi-store-deployer

Thank you Jamie!!

It works like a charm and solves the problem precisely!

@nboliver-ventureweb
Copy link

@skyproddev Does your theme have an asset build step? How do you handle that, if so?

@skyproddev
Copy link
Author

@skyproddev Does your theme have an asset build step? How do you handle that, if so?

Nowadays I try to follow the structure of the newest Dawn version, where it's regular uncompiled css and js, and it's split up into many files, which are included in individual sections. But I have used webpack and gulp and stuff back in the days. Then I just put it in a dev folder and keep it on github along with the theme. Its not a problem. The Shopify github connection will ignore files in a folder that's not in their structure, so it stays only on your local machine and on github.

@Jamiemccleave
Copy link

@skyproddev Thanks!

@jeffreyguenther
Copy link

@skyproddev Looks like you've found a solution that works for you.

If you're curious about an alternative solution check out Shopkeeper. It takes a slightly different approach that treats main as the source of truth and your theme folder as a 'build artifact'.

Copy link
Contributor

github-actions bot commented May 7, 2024

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@isaacroldan isaacroldan added the Area: @shopify/theme @shopify/theme package issues label May 10, 2024
Copy link
Contributor

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@hannahbeasley
Copy link

This is an issue for our agency as well! Another consideration for us is the idea of third party apps being able to edit code themselves - and those changes are of course always pushed to Github. If we have an app installed on one store but not another, we don't want the app edits showing up on a store that's not using that app.

But at the end of the day, what's most important for us is to be able to streamline theme updates. One of our clients has two sites that are essentially identical at the code level, and just have varying content and apps. It's inefficient for us to manually manage separate branches for each store, when updates at the theme level from our side will always apply to both sites. So being able to use a single branch for both sites would save us a lot of time.

I think it would be ideal if Shopify contextualized all files that store content (layout files, templates, section groups) and made a way for that to optionally be protected at the store level while still allowing all other theme content to be shared as needed.

@leon-schnieders
Copy link

We need this too, as we have a couple of very similar shops. I suggest a solution similar to custom apps for managing themes across multiple stores. "Custom themes" could be published to all stores in a Shopify Plus organization with a single install link and updated centrally. This would streamline updates and maintain store-specific settings.

Looking forward to updates on this thread!

@kfalkiewicz
Copy link

For me this is also crucial, as most of the Polish Shopify stores needs second store account for international payments (no Shopify Payments support in Poland yet). This is a common problem here. Of course 1 merchant uses 1 theme for both the accounts and want's to have the same codebase on both.

Copy link
Contributor

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@nboliver-ventureweb
Copy link

Still relevant.
See also #4438

@jeffreyguenther
Copy link

Second. Still relevant.

@lukeh-shopify
Copy link
Contributor

👋🏻 Hi all, thanks for the feedback on this issue.

While we work on prioritizing this feature internally, I would recommend trying out third party tooling such as Shopkeeper to see if it can meet your needs (#3509 (comment)).

Thanks for your patience all 😄

@lukeh-shopify lukeh-shopify added the open for contributions theme bugs that won't be prioritized in the near future label Sep 25, 2024
@jeffreyguenther
Copy link

Thanks for the shout out! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues open for contributions theme bugs that won't be prioritized in the near future Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests