doc-site
Runbooks

Deploy and roll back

A release broke the storefront, a code change is not live, or a theme editor change has disappeared. Find the cause and restore the previous state.

Use this runbook when:

  • the storefront broke after a merge to theme main;
  • a merged change does not appear on the live site;
  • a change made in the theme editor has disappeared;
  • a Cloud Run service release broke the booking form or the cart.

The theme's history is in git, including theme editor saves, so most problems can be traced and reverted from asc-shopify-theme.

Diagnose

1. List recent changes

git -C theme fetch
git -C theme log origin/main --since="7 days ago" --format="%h %ad %an %s" --date=iso

Commits by shopify[bot] are theme editor or Admin code editor saves. Their body names the staff member who made the edit. Other commits are developer merges.

2. Match the symptom

SymptomLikely causeNext step
Site broke straight after a developer mergeThe merged changeStep 3
Merged change not liveBuilt files not committed in the theme repository, or the connected theme did not syncStep 4
Theme editor change disappeared after a releaseThe merge replaced a JSON file with an older versionStep 5
Booking form or cart errors after a service releaseThe Cloud Run revisionStep 6

3. Confirm a merge caused it

git -C theme show --stat <merge commit>

Check that the files it changed relate to the broken area. Open the same page on a theme connected to the commit before the merge, if one exists, to confirm.

4. Change not live

  1. Confirm the merge is on theme main, not only on asc-shopify-src main.

  2. If the change involves src/, confirm the matching theme/assets/*.bundle.js or styles.css changed in the theme merge:

    git -C theme log origin/main --format="%h %s" -5 -- assets/camp-booking.bundle.js assets/custom.bundle.js assets/styles.css
  3. In Shopify Admin under Online Store, Themes, confirm the live theme is the one connected to main, and check its GitHub connection for a sync error.

  4. Reload the storefront in a private window. Asset URLs carry a version parameter, so a stale file is usually a stale page rather than a stale asset.

5. Theme editor change disappeared

Find the bot commit that saved the change:

git -C theme log origin/main --author="shopify" --format="%h %ad %s" --date=iso -- templates/ sections/ config/settings_data.json

Then find the developer commit that overwrote it:

git -C theme log origin/main --format="%h %an %s" -- <file>

Compare the file at the two commits with git -C theme diff <bot commit> <later commit> -- <file>.

6. Service release

In the Google Cloud console, project asc-map-project, open Cloud Run and the service. Compare the time of the latest revision with the time errors started, and read the revision's logs.

Repair

Revert a theme merge

git -C theme checkout main
git -C theme pull
git -C theme revert -m 1 <merge commit>
git -C theme push

Shopify redeploys main to the connected theme. Revert the matching merge in asc-shopify-src as well, so src/ matches what is live.

If the merge also contained theme editor changes, check the revert has not removed them.

Restore a theme editor change

Either re-enter the setting in the theme editor, which creates a new bot commit, or restore the file from the bot commit on a branch and release it:

git -C theme checkout -b restore-editor-change origin/main
git -C theme checkout <bot commit> -- <file>

Restoring the whole file also restores any other settings in it at that time. Check the diff before committing.

Restore the whole theme quickly

If the site is badly broken and the cause is not yet clear, publish a previous working theme from Online Store, Themes. Duplicate the live theme first so its current state is kept. While another theme is published, merges to main still update the connected theme, but customers do not see them until that theme is published again.

Roll back a service

In Cloud Run, open the service's Revisions tab and route all traffic to the previous revision. This does not change the code in the repository, so fix or revert there before the next release.

Verify

  1. Open the affected pages in a private window.
  2. Book up to the cart and use a membership pass as a test customer, if those areas were involved.
  3. Confirm git -C theme log origin/main -1 is the commit you expect.

Escalate

If Shopify's GitHub connection shows an error that a reconnect does not fix, contact Shopify support with the theme name and repository. For Cloud Run access, contact the owner of the Google Cloud project.

The release process is in Releasing a change.

On this page