Deploy Shopify Themes from GitHub Automatically with DeployHQ

Tutorials

Managing a Shopify theme across a team of developers without version control is a recipe for conflicts and lost work. While Shopify's admin interface lets you edit theme files directly, it doesn't support collaborative development workflows, branching, or code review.

By connecting your GitHub repository to DeployHQ, you can deploy theme changes to your Shopify store automatically every time you push a commit. Only the files that changed are uploaded, and your entire theme history stays in Git where it belongs.

How Shopify theme deployment works with DeployHQ

DeployHQ connects to your Shopify store using the Shopify API and deploys theme files directly from your Git repository. This works with any Shopify theme — whether you're using Dawn, a custom theme, or a third-party theme you've customised.

The workflow looks like this:

  1. Develop your theme locally using your preferred tools
  2. Commit and push changes to GitHub
  3. DeployHQ automatically uploads only the changed files to your Shopify theme

This approach works well alongside Shopify CLI for local development. You can use shopify theme dev to preview changes locally, then push to GitHub when you're ready to deploy to your live or staging theme.

What you'll need

Creating a DeployHQ project

After signing in to DeployHQ, click New Project at the top of the screen.

Creating a new project in DeployHQ

Enter a project name and select your repository host. DeployHQ supports GitHub, GitLab, Bitbucket, and other providers.

Connecting your repository

After clicking Create Project, authorise DeployHQ with your repository host and select the repository containing your Shopify theme.

Selecting a repository

Keep the Add a webhook option checked to enable automatic deployments when you push new commits.

Configuring your Shopify store

On the New Server screen, select Shopify as the protocol.

Shopify server configuration

Enter your store URL in the format mystore.myshopify.com and provide a theme name. Click Create Server, and you'll be redirected to Shopify to authorise DeployHQ's access to your store.

Approving <a href=DeployHQ access in Shopify' />

Running your first deployment

Click Deploy for the first time in the top right of your project:

Starting the first deployment

Review the deployment details and click the green Deploy button. DeployHQ uploads all theme files from your repository to your Shopify store.

First deployment complete

Setting up automatic deployments

Navigate to Automatic Deployments in the left sidebar and enable the option for your Shopify server:

Enabling automatic deployments

Now every push to your repository triggers a deployment. Only the changed files are uploaded to your Shopify theme:

Automatic deployment showing changed files

You can verify the changes in your Shopify admin under Online Store → Themes → Edit code:

Modified template in Shopify admin

Using build pipelines for modern theme development

Modern Shopify theme development often involves build tools for compiling Tailwind CSS, bundling JavaScript modules, or processing assets. Since Shopify doesn't support running commands on its servers, DeployHQ's build pipeline handles this for you.

Define build commands that run before deployment:

Build pipeline commands

A typical Shopify theme build might include:

npm install
npx tailwindcss -i ./src/input.css -o ./assets/theme.css --minify
npm run build

DeployHQ runs these commands in an isolated environment, then deploys the compiled output to your Shopify theme.

Caching dependencies

To speed up builds, add node_modules to your cached build files under Build Pipeline → Build Configuration. This avoids re-downloading dependencies on every deployment.

Working with multiple themes

Shopify allows multiple themes per store, which is useful for staging. In DeployHQ, you can add multiple servers within the same project — each pointing to a different Shopify theme. Deploy your main branch to your live theme and a staging branch to a preview theme using DeployHQ's multi-environment setup.

Theme structure best practices

For a clean deployment workflow, organise your repository to match Shopify's expected theme structure:

├── assets/           # CSS, JS, images
├── config/           # Theme settings (settings_schema.json, settings_data.json)
├── layout/           # Theme layouts (theme.liquid)
├── locales/          # Translation files
├── sections/         # Theme sections
├── snippets/         # Reusable Liquid snippets
└── templates/        # Page templates

Exclude files that shouldn't be deployed (like local development configs) using DeployHQ's excluded files feature. Common exclusions for Shopify themes include node_modules, .env, and build source files.

Protecting sensitive configuration

Shopify theme settings (config/settings_data.json) contain store-specific configuration that you may not want to overwrite on every deployment. Consider adding this file to your excluded files after the initial deployment, so theme customisations made through the Shopify admin aren't overwritten by deployments.


Ready to streamline your Shopify theme deployments? Sign up for DeployHQ and connect your GitHub repository in minutes.

If you have any questions about Shopify deployments or any other aspect of DeployHQ, contact us at support@deployhq.com or reach out on X (Twitter).