How to Deploy a Shopify Theme from Bitbucket with DeployHQ

Git, Shopify, and Tutorials

When it comes to updating a Shopify theme while using version control, the two workflows don't naturally connect. You can push code changes to Bitbucket easily enough, but getting those changes onto your live Shopify theme still means logging into the Shopify admin and uploading files by hand.

DeployHQ bridges that gap. It connects your Bitbucket repository directly to your Shopify store, so every push to your repository automatically updates your theme. No manual uploads, no missed files, no context switching between tools.

This guide walks you through connecting a Bitbucket repository to a Shopify theme, running your first deployment, and setting up automatic deployments on push.

What you'll need

  • A Bitbucket repository containing your Shopify theme files
  • A Shopify store with theme access
  • A DeployHQ account (free plan: 1 project, up to 10 deploys/day)

If you're using GitHub or GitLab instead of Bitbucket, the process is the same — just select your provider when creating the project. DeployHQ supports all major Git hosting platforms.

Step 1: Create a new project in DeployHQ

Click the New Project button at the top of the screen.

New project

Enter a name for your project and choose Bitbucket. You can connect to repositories on any of the main providers — Bitbucket, GitHub, GitLab — or configure a repository manually.

Step 2: Connect your Bitbucket repository

Click Create Project and you'll be prompted to log in to Bitbucket, then choose your account. You'll see a list of repositories you have access to.

Repository list

Select the repository containing your Shopify theme. DeployHQ will automatically add an SSH key for access. Keep the add a webhook option checked to enable automatic deployments later.

Step 3: Configure your Shopify theme

After connecting your repository, you'll be directed to the New Server screen. Enter a name for your server, then choose Shopify as the protocol.

Shopify config

Enter the store URL in the format mystore.myshopify.com and add a theme name. Click Create Server — you'll be taken to the Shopify interface to log in and authorize DeployHQ's access to your store.

Approve Shopify

Step 4: Run your first deployment

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

First deployment

Review the details — the server and branch are selected automatically. The start revision shows The very first commit since nothing has been deployed yet. Click Deploy to push all theme files to Shopify.

First deployment complete

Once complete, review the deployment log to see which files were transferred.

Step 5: Enable automatic deployments

Go to the Automatic Deployments page in the left sidebar and enable it for your Shopify server:

Auto deployment

Now every push to Bitbucket triggers a deployment automatically. Only changed files are uploaded — DeployHQ compares commits and pushes just the diff to your Shopify theme.

New deployment

You can verify the changes in your Shopify admin under the theme code editor:

Modified template

Compiling assets with build pipelines

One limitation of deploying to Shopify is the inability to run server-side commands. If your theme uses Sass, TypeScript, or a bundler like Webpack, you need to compile assets before uploading.

DeployHQ's Build Pipelines feature handles this. Define build commands that run in an isolated environment before each deployment:

Build commands

Common build commands for Shopify themes:

npm install
npm run build

The build environment comes pre-installed with Node, Ruby, PHP, and many more languages. After the build completes, the compiled assets are uploaded to your Shopify theme. No need to commit built files to Git — your repository stays clean and your theme always gets fresh builds.

Check out our guides for more on deploying popular frameworks to Shopify.

If you have questions, email us at support@deployhq.com or find us on Twitter/X.