Build and deploy a
new theme to the store that you're connected to.
npm run deploy:new
Build and deploy to an
existing theme on the store that you're connected to.
npm run deploy
The deploy task overrides all files of the remote theme! If any changes were made through the Shopify theme editor you might want to download the theme files before deploying
Make sure you have a clean git history and committed all files.
npm run shopify:pull
- Revert any files that were pulled and you don't need e.g. Because you already have a newer version.
Shopify provides a Shopify GitHub integrationopen in new window, but since Theme Lab uses a custom build-workflow it's not out of the box compatible with the integration.
You can only connect branches that match the default Shopify theme folder structure via the Shopify GitHub integration.
One of the simplest ways to circumvent this limitation is to use a separate repo for your dist files.
- When you're ready to publish a theme simply run the build task.
npm run webpack:build
- Then move the contents of the
shopifydirectory from the
dist-codedirectory and push your changes to GitHub.
shopify-theme-lab/ ├─ source-code/shopify/ <- move all contents from here └─ dist-code/ <- to here
- Follow the Shopify GitHub integration Instructionsopen in new window and select your main brach from the dist repo for the Shopify GitHub integration.
The Shopify docsopen in new window describe several other ways how to set up version control with a custom build-workflow.