Car Battery Pro
Technical Reference

Deployment & releases

How theme changes reach the live store, and how the repo stays in sync with Shopify.

Deployment & releases

🛠 Dev

There are two directions to keep in mind: pushing code to Shopify, and pulling changes made in the Shopify admin back into the repo.

Pushing a release

The repo ships a versioned deploy helper:

npm run deploy

This runs scripts/deploy.js, which creates/updates a theme named from the themeNameTemplate in package.json (e.g. CBP v1.0.0), appending the version. Options:

  • --name <name> — override the theme name.
  • --force — deploy even if a same-named theme exists (a timestamp is appended to avoid duplicates).

For ad-hoc pushes you can also use the standard npm run push (shopify theme push). See Shopify CLI theme commands.

Bump the version in package.json before a release so the deployed theme name reflects it. Confirm the team's release process (which theme is published live, how rollbacks happen) and record it here.

Pulling changes back from Shopify

Content editors can change the theme in the Shopify admin. To stop those edits drifting away from the repo, a GitHub Actions workflow (.github/workflows/theme-pull.yml) pulls the live theme and commits it to the production branch. It runs:

  • on a daily schedule (midnight),
  • on demand (workflow_dispatch), and
  • when triggered by a theme_update repository dispatch event.

It requires these repo secrets/variables: SHOPIFY_CLI_THEME_TOKEN, SHOPIFY_FLAG_STORE, and SHOPIFY_FLAG_LIVE=true.

Because admin edits land on production automatically, always reconcile your local branch with production before starting work, so you don't overwrite live changes.

  1. Develop and test locally (npm run dev) against the staging API (debug mode on).
  2. Reconcile with the latest production branch.
  3. Bump version in package.json.
  4. Deploy (npm run deploy) and verify on the resulting theme before publishing it live.
  5. Confirm debug mode is off so the live store uses the production API.

On this page