--ignore flag does not ignore .json files?

Hi all,

Looking around at GitHub issues, it seems like this was a problem that got fixed a while ago—but I’m still running into it.

We’re working with a multi-store setup for a client who wants to manage all storefronts from a single repo. Unfortunately, we can’t use the GitHub integration as-is, because .json content keeps overwriting itself across stores (we definitely don’t want a 4th of July promo showing up on the UK site, if you catch my drift).

To work around that, I wrote some GitHub Actions that iterate over a store matrix and deploy to the correct theme for each store when code is pushed to a given branch. For example, pushing to testing triggers a deployment to each store’s Testing theme.

The problem: we’re using the --ignore *.json flag to prevent overwriting content, but… it’s not working at all. The .json files are still being uploaded.

What am I missing?

Hi Cory,

Just to confirm, when you’re using the CLI to push changes the ignore flag is not working on all .json files? Is it working on .json files is some directories but not others?

Hey @Liam-Shopify , this can actually be marked as ‘solved’–I figured it out. So for context, and for anyone else that may run into this.

In setting up the Github action mentioned above to deploy/upload the same theme across several stores without uploading .json content, I was declaring an args variable that would be used with the CLI command (ie. args='--store=$store_domain --allow-live --theme $theme_id --ignore \"*.json\"') apparently this is either formatted wrong in my yaml file, or Shopify just didn’t like the way it was being built.

Long story short: I hard coded the appropriate flags in the command in my yaml file and now it works!

Great to hear you figured this out Cory, and thanks for posting your solution!

1 Like