Complete guide to the multi-shop development workflows supported by ShopDevs Multi-Shop.
This system supports two distinct development patterns:
- Core Feature Development - Non-shop-specific features and bugfixes (GitHub Flow)
- Shop-Specific Development - Shop customizations, campaigns, and promos
For features that apply to all shops (components, bugfixes, core functionality):
feature/your-feature → main → shop-*/staging → shop-*/main
git checkout main
git pull origin main
git checkout -b feature/carousel-fixpnpm run dev
# → Detects feature branch
# → Prompts: "Select shop for testing"
# → Choose: shop-a (staging)
# → Shopify CLI starts with shop-a staging credentialsTest the same code against different shops:
pnpm run dev
# → Choose: shop-b (staging)
# → Test same feature in different shop contextgit add . && git commit -m "Fix carousel responsive issues"
git push -u origin feature/carousel-fix
# Direct to main (GitHub Flow):
gh pr create --base main --title "Fix carousel responsive issues"
# Or get instructions:
multi-shop workflow feature
# → Shows exact PR commands- Team reviews PR:
feature/carousel-fix → main - After approval and merge to main
After merge to main, either:
Option A: GitHub Action (if configured)
# .github/workflows/shop-sync.yml automatically creates:
# main → shop-a/staging
# main → shop-b/staging
# main → shop-c/stagingOption B: Manual PRs
multi-shop workflow deploy
# → Shows commands for creating shop PRs:
# gh pr create --base shop-a/staging --head main --title "Deploy carousel fix"
# gh pr create --base shop-b/staging --head main --title "Deploy carousel fix"Each shop team reviews their staging PR:
main → shop-a/staging(approved by shop-a team)main → shop-b/staging(approved by shop-b team)
After staging approval:
gh pr create --base shop-a/main --head shop-a/staging --title "Deploy carousel fix to shop-a production"
gh pr create --base shop-b/main --head shop-b/staging --title "Deploy carousel fix to shop-b production"For shop customizations, campaigns, and promos:
shop-a/main → shop-a/custom-feature → shop-a/main
shop-a/main → shop-a/promo-sale → [Shopify content] → shop-a/main
- Create Shop Branch
git checkout shop-a/main
git pull origin shop-a/main
git checkout -b shop-a/custom-fitness-calculator- Auto-Detected Development
pnpm run dev
# → Auto-detects: shop-a
# → Automatically starts dev server for shop-a staging
# → No shop selection needed!- Create Shop-Specific PR
gh pr create --base shop-a/main --title "Add fitness calculator for shop-a"- Start Promo Campaign
pnpm run shop
# → Campaign Tools → Create Promo Branch
# → Select shop: shop-a
# → Promo name: summer-fitness-sale
# → Creates: shop-a/promo-summer-fitness-sale- Connect to Shopify Theme
# Shopify Admin → shop-a store → Themes → Add theme
# → Connect from GitHub
# → Branch: shop-a/promo-summer-fitness-sale
# → Theme name: "Summer Fitness Sale"- Customize in Shopify
- Use Shopify Theme Customizer to add sale banners, pricing, etc.
- GitHub integration automatically syncs content back to
shop-a/promo-summer-fitness-sale
- Launch Promo
# Option A: Launchpad app (automated)
# Option B: Shopify Admin → Publish theme manually- Push Promo Content to Main After promo launches, keep main current:
pnpm run shop
# → Campaign Tools → Push Promo to Main
# → Creates PR: shop-a/promo-summer-fitness-sale → shop-a/main
# → Review shows content-only changes
# → Merge after review- Republish Main
# Shopify Admin → Publish shop-a/main theme
# → Now main is current with promo content- End Promo (Optional)
pnpm run shop
# → Campaign Tools → End Promo
# → Creates: shop-a/end-promo-summer-fitness-sale
# → Based on current shop-a/main (includes code updates)
# → Remove promo-specific content
# → Create Shopify theme from end-promo branch
# → Publish when readyThe pnpm run dev command automatically detects your context:
| Branch Pattern | Behavior | Example |
|---|---|---|
main |
Feature workflow | Choose shop for testing |
feature/* |
Contextual development | Choose shop for testing |
hotfix/* |
Feature workflow | Choose shop for testing |
shop-a/* |
Auto-detected shop | Start shop-a immediately |
shop-a/promo-* |
Auto-detected shop | Start shop-a immediately |
When on feature branches, you'll be prompted:
pnpm run dev
# 🚀 Contextual Development
#
# Current branch: feature/carousel-fix
#
# Select shop for testing:
# ❯ shop-a (Fitness Store)
# shop-b (Beauty Store)
# shop-c (Electronics Store)
#
# Select environment:
# ❯ staging (recommended)
# production (live store)
#
# 🔗 Starting Shopify CLI...
# shopify theme dev --store=staging-shop-aEach developer has their own credentials:
shops/credentials/shop-a.credentials.json # Your personal tokens
shops/credentials/shop-b.credentials.json # Your personal tokensThese are never committed - each developer sets up their own.
# Contextual development (works anywhere)
pnpm run dev
# Shop management
pnpm run shop
# Sync feature with main
pnpm run sync-main
# Test PR workflows
pnpm run test:pr
# Security audit
multi-shop audit# Core features (apply to all brands)
feature/carousel-improvements
hotfix/critical-security-fix
bugfix/checkout-flow-issue
# Shop-specific (only for one shop)
shop-a/custom-fitness-section
shop-b/beauty-quiz-feature
# Campaigns (temporary promotions)
shop-a/promo-summer-sale
shop-b/promo-holiday-2024
# Promo endings (content cleanup)
shop-a/end-promo-summer-sale// shops/shop-a.config.json (committed)
{
"shopId": "shop-a",
"name": "Fitness Store",
"shopify": {
"stores": {
"production": {
"domain": "fitness-store.myshopify.com",
"branch": "shop-a/main"
},
"staging": {
"domain": "staging-fitness-store.myshopify.com",
"branch": "shop-a/staging"
}
},
"authentication": {
"method": "theme-access-app"
}
}
}// shops/credentials/shop-a.credentials.json (local only)
{
"developer": "your-name",
"shopify": {
"stores": {
"production": { "themeToken": "your-production-password" },
"staging": { "themeToken": "your-staging-password" }
}
},
"notes": "Theme access app credentials for shop-a"
}pnpm run dev # Always works, adapts to your branchOn feature/carousel-fix:
- Prompts for shop selection
- Tests your feature across different brands
- Code stays on feature branch
On shop-a/custom-section:
- Auto-detects shop-a
- Starts immediately with shop-a credentials
- No shop selection needed
On shop-a/promo-summer-sale:
- Auto-detects shop-a promo context
- Starts with shop-a credentials
- Connected to promo theme in Shopify
This is contextual development - the same command behaves intelligently based on where you are in the workflow.