github-workflow
TL;DR
Yes, both directions are supported:
| Direction | Method |
|---|---|
| Shopify → GitHub | Official GitHub app auto-commits admin changes |
| GitHub → Shopify | Auto-deploys on branch commits OR GitHub Actions CI/CD |
Option 1: Official Shopify GitHub Integration (Easiest)
Shopify has a built-in GitHub app that handles bi-directional sync automatically.
Setup
- Go to Online Store > Themes in Shopify admin
- Click Add theme > Connect from GitHub
- Select your organization/account
- Select repository and branch
How It Works
┌─────────────────┐ ┌─────────────────┐│ Shopify │ ◄─────► │ GitHub ││ Admin │ sync │ Repository │└─────────────────┘ └─────────────────┘ │ │ ▼ ▼ Edit in theme Push commits editor/customizer from local dev │ │ └────► Auto-commits ────────┘ to branchFeatures
- Shopify → GitHub: Edits in Shopify admin auto-commit to connected branch
- GitHub → Shopify: Commits to branch auto-deploy to connected theme
- Conflict resolution: Conflicts can be resolved in GitHub or force-pushed
- Branch-based workflows: Connect different branches to different themes (dev/staging/production)
Branch Strategy Example
| Branch | Connected Theme | Purpose |
|---|---|---|
main | Live theme | Production |
staging | Preview theme | QA/testing |
feature/* | Dev themes | Feature development |
Option 2: GitHub Actions CI/CD (More Control)
For more complex workflows, use GitHub Actions with Shopify CLI.
Prerequisites
- Theme Access password from Shopify admin
- GitHub repository secrets configured
Required Secrets
SHOPIFY_STORE_URL: mystore.myshopify.comSHOPIFY_CLI_THEME_TOKEN: shptka_xxxxx # Theme Access token# OR for private app:SHOPIFY_PASSWORD: xxxxxSHOPIFY_API_KEY: xxxxxBasic Deploy Workflow
name: Deploy Theme
on: push: branches: [main]
jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Install Shopify CLI run: npm install -g @shopify/cli @shopify/theme
- name: Deploy to Shopify run: | shopify theme push --store ${{ secrets.SHOPIFY_STORE_URL }} \ --theme ${{ secrets.SHOPIFY_THEME_ID }} \ --path ./theme env: SHOPIFY_CLI_THEME_TOKEN: ${{ secrets.SHOPIFY_CLI_THEME_TOKEN }}PR Preview Workflow
Using shopify-theme-actions:
name: PR Preview
on: pull_request: types: [opened, synchronize, reopened, closed]
jobs: preview: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- uses: matthew-petrie/shopify-theme-actions@v1 with: ACTION: "DEPLOYMENT_PREVIEW" SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }} SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }} SHOPIFY_API_KEY: ${{ secrets.SHOPIFY_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}This creates a preview theme per PR and comments with a preview link.
Option 3: Theme Kit (Legacy)
Older but still functional approach using Theme Kit:
- uses: pgrimaud/action-shopify@master with: args: deploy env: SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }} SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }} SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }} THEME_PATH: ./Note: Shopify CLI is recommended over Theme Kit for new projects.
Local Development Workflow
Setup
# Install Shopify CLInpm install -g @shopify/cli @shopify/theme
# Pull existing themeshopify theme pull --store mystore.myshopify.com
# Start dev server with hot reloadshopify theme dev --store mystore.myshopify.comFull Workflow
1. Clone repo from GitHub2. shopify theme pull (sync latest from Shopify)3. Make changes locally4. shopify theme dev (preview changes)5. Commit & push to GitHub6. GitHub Action deploys OR auto-sync deploysComparison
| Feature | Official GitHub App | GitHub Actions |
|---|---|---|
| Setup complexity | Low | Medium |
| Bi-directional sync | Yes (automatic) | Manual (pull first) |
| PR previews | No | Yes (with actions) |
| Custom workflows | No | Yes |
| Multiple environments | Yes (branch-based) | Yes (configurable) |
| Conflict handling | Built-in | Manual |
| Cost | Free | Free (GitHub Actions minutes) |
Recommendations
| Use Case | Recommendation |
|---|---|
| Solo developer, simple workflow | Official GitHub Integration |
| Team with code review process | GitHub Actions + PR previews |
| Multiple environments (dev/staging/prod) | Either works, Actions more flexible |
| Non-technical editors + developers | Official integration (handles admin edits) |
Third-Party Apps
- ThemeFlow ($19/mo): Enhanced GitHub integration with merge functions and automation flows