Shopify Integration
Shopify integration in DeployBot is a great way to streamline the development, review, and deployment of your store themes. It also greatly simplifies the process of managing multiple themes at the same time and keeping track of updates going to many stores.
Just wanted to let you know that starting October 19, 2023, Shopify has announced that they are revoking the API tokens created by the Shopify OAuth application. It seems like apps designed for and marketed to developers are no longer allowed and won't pass the review process.
If you still integrate with Shopify via OAuth, make sure to change the authorization method from OAuth to access token. Otherwise, your Shopify integrations will soon stop working (see below).
Setting up deployment to Shopify theme from an existing repository
If you already have a repository in your account that has a Shopify theme and you want to be able to deploy it through DeployBot, here we will describe how you can do it.
Start by creating a new deployment environment in the Deployments tab or use an existing environment. Once the environment is created, you can add a new server of "Shopify Theme" type and you should see the following screen (part of the page is shown):
On that page you can enter a name of a server and your store details. You have an option of automatic or API key based authentication to Shopify. After you integrate with the store you can select either an existing theme or create a new one in your store, and that's where we will deploy the files.
Troubleshooting Shopify
How do I get the API Key and Admin API Access Token?
You can find this information here: https://shopify.dev/docs/apps/auth/admin-app-access-tokens#generate-private-app-credentials.
But, here it's the walk-trough:
First, create a Development App within your Shopify Store (Test App):
- Click on Develop Apps, and then Create an App: Test App
- In the configuration tab, the required privileges are: write_themes, read_themes, write_online_store_pages, read_online_store_pages.
- Finally, the keys that you need are here:
Why are some of the files I deploy are ignored?
Shopify is very restrictive in what it accepts as theme files; only certain directories and files are allowed to be stored in a theme. Every file or directory that does not fit the pattern accepted by Shopify will be ignored and reported as such in the log.
My deployment fails on the same file. Why?
Please check if the file contains broken unicode characters. One good way to test if something is wrong with the file is to try to upload it manually to your theme through the Shopify interface and see if it works there. If it works there, but not in DeployBot, please contact our support to investigate the issue.
Shopify it's rejecting one of my files?
Shopify will perform a validation over the .liquid files, and if there is an issue on it, it will stop the deployment. You will have to fix the issue in the file (which you can discover in the log viewer), and then try again. The check is done on Shopify side and it does nothing to do with DeployBot.
Why are my Shopify deployments are failing?
The DeployBot Shopify App was deprecated due to some changes in the API. Because of that, the credentials should be entered manually as explained above.