Connect Github to a new theme via Shopify CLI

Solved

Connect Github to a new theme via Shopify CLI

deMenezes
Tourist
8 0 4

Is it possible to automatically create a theme on Shopify once a branch is created on Github?

 

git checkout -b new-branch
git push origin new-branch

// Now Shopify creates my theme automatically connected to this branch

 

We already have Github connected to our store, and we've already managed to make this connection manually (clicking "Add theme" and then "Connect from Github").

 

If it's not possible to do this automatically, is it possible via the Shopify CLI?

 

The order of commands that come closest to what I need are these:

 

git checkout main
git pull origin main
git checkout -b my-branch
git push origin my-branch
shopify theme init "Theme name" --clone-url <repository-url>
shopify theme share

 

But this way, the new theme created is not connected with Github.

Accepted Solution (1)

nidhipatel
Pathfinder
89 20 24

This is an accepted solution.

Hi @deMenezes 

 

I have try to automatically create a new theme using Github branch, but it is not possible in shopify to create automatic new theme and using shopify theme share command, also not possible to connect Github automatically.

 

We have to select branch manually using Add theme option.

 

Thank you.

If our answer is helpful then please feel free to Like and Accept it as solution!
Hire our Shopify Developers for all your small & big needs:
New Store Development | Custom Theme Development | Site Speed Optimization
Email: [email protected] | Instagram: @mintyourstore

View solution in original post

Replies 2 (2)

nidhipatel
Pathfinder
89 20 24

This is an accepted solution.

Hi @deMenezes 

 

I have try to automatically create a new theme using Github branch, but it is not possible in shopify to create automatic new theme and using shopify theme share command, also not possible to connect Github automatically.

 

We have to select branch manually using Add theme option.

 

Thank you.

If our answer is helpful then please feel free to Like and Accept it as solution!
Hire our Shopify Developers for all your small & big needs:
New Store Development | Custom Theme Development | Site Speed Optimization
Email: [email protected] | Instagram: @mintyourstore
deMenezes
Tourist
8 0 4

I imagined it would be like this.

 

Thank's for your time