Hosted storefronts and GitHub
Your own storefront code, built from GitHub on every push and run by Storeloom on your store’s addresses.
In the admin Settings › Own frontend › Hosted on Storeloom
If you or your developers write your own storefront (for example with React Router), Storeloom can run it for you on your store’s addresses instead of your theme. The code lives in your GitHub repository; every push builds it on GitHub and sends the finished files to Storeloom. Your products, orders, checkout and cart stay Storeloom’s.
Open Settings › Own frontend and choose Open on Hosted on Storeloom. Only the store owner and admins can. A storefront of your own code comes with the Scale and Enterprise plans: on another plan you can’t create one, deploy to it or put it live, and while the plan does not include it your theme answers your store’s addresses.
Make a storefront
Under Your first hosted storefront, give it a name (such as “New look”) and choose Create storefront, then Open it. A store can have up to five. Each has two environments: Production, which is what goes live, and Preview, for everything else.
Connect GitHub
- Choose Connect GitHub. GitHub asks which repositories Storeloom’s app may use: choose your storefront’s.
- Back in Storeloom, check Choose the repository:
- Repository: the one to deploy.
- Production branch: pushes here deploy to Production; pushes to every other branch deploy to Preview.
- Install command, Build command, Build folder and Worker module: Storeloom suggests them from your repository’s files (for example
npm ci,npm run build,distandserver/index.js). The Worker module is the file in the build folder that answers every request.
- Choose Open pull request. Storeloom opens a pull request on your repository that adds two files:
.github/workflows/storeloom.yml, the workflow that builds and deploys, and.storeloom/deploy.mjs, the small script that sends the files. - Merge the pull request. From then on, every push deploys.
No password, key or token is added to your repository. Each time the workflow runs, GitHub proves to Storeloom which repository and branch it is building, and Storeloom accepts it only for the storefront you connected. A pull request’s branch can never deploy to Production.
If your GitHub organisation must approve new apps, Storeloom says so; connect again once an owner of the organisation has approved it. Add another GitHub account installs the app on another account or organisation.
Deployments and previews
Deployments lists every deployment, newest first, with where it came from (GitHub, the command line or CI), its message, size and time, and which environment shows it.
- Publish puts a deployment on Production. Publishing an older one rolls back.
- Preview next to an environment opens a private link to it on your store’s address, for 24 hours. Anyone with the link can look; search engines are told to stay away.
Go live
Go live shows the storefront on your store’s addresses instead of your theme; it needs a deployment on Production first. If the storefront fails or takes too long, your theme answers instead, so shoppers never see an error. Take offline brings your theme back at once.
Change or disconnect
On the repository’s card, Change lets you choose another repository, branch or commands: Storeloom opens a new pull request. Disconnect stops the workflow from deploying here at once; the two files stay in your repository until you delete them.