With the arrival of Shopify 2.0, it’s now thrown my development workflow out of the window. The `config.yml` made development much more manageable when working on different store features because it linked directly to a particular theme and excluded any changes made to the `settings_data.json` file. But, the new CLI seems to add extra complications to the workflow by requiring frequent pulls and pushes.
Here’s my typical development workflow for version 1 themes:
- Do `theme download` to get the latest changes from the live theme
- Pull from main and checkout a new branch
- Log into Shopify store admin
- Duplicate the published theme
- Rename the duplicated theme to the name of your branch
- Click “Customize Theme” of your new branch theme
- Note the theme ID in the URL (example: /admin/themes/9542224/settings)
- Edit the theme_id in config.yml to point to your branched theme
- theme watch and do your work
- Preview your work by navigating to that theme in Shopify admin and clicking preview
- Create Pull Request
- Merge PR to the main repo
- Delete your branch (local and server)
- Delete your branched theme in Shopify Admin
- And then for deployment:
- Make sure to kill your local theme watcher
- Remove your theme ID (to point it to the published theme)
- Create a backup of the existing production theme (by duplicating it)
- Use `theme deploy` to push master onto the primary theme.
- Tag the release in Github.
As you can see, this was a simple workflow that allowed for features to be worked on by different devs using different theme instances. I frequently work on dev environments and then deploy the new features to production stores (i.e. they’re both separate stores), so this workflow worked perfectly because of config.yml.
Settings data?
I’ve been working on a couple of 2.0 sites recently and am starting to find the push, pull and serve methods to be cumbersome. There have been occasions where I’ve accidentally reset some of the section settings data because I forgot to do a pull first or changed some code. This seems to be the main issue for me.
So…
It would be good to get an idea of how other devs are managing their workflow.
- What is your development process for 2.0?
- Have you managed to get around the section settings data issue?
- And, how have you managed deployments between dev and live environments when they are two separate stores?
Let me know at: https://community.shopify.com/c/online-store-2-0/what-s-your-development-workflow-for-shopify-2-0/m-p/1313342