Getting started
Before you start
If you are not familiar with Git and GitHub, please see the useful links and check the tutorials before you start.
You need a GitHub account. Using the Addon Repository doesn't require a paid account.
You also need the Addon Repository enabled on your Partner e-shop. Please contact your Partner Manager.
Installation
Enable the Addon Repository module
In the administration, open the detail of the addon you want to use and, in the Codes tab, enter the URL of the
repository in the Url of the GitHub repository field, for example https://github.com/your-organization/your-addon/.
The URL must start with https://; www. and the trailing slash are optional. The owner and the repository name may contain only letters, digits, hyphens and underscores – a repository with a dot in its name (for example my.addon) is rejected, so rename it first.
Fill in the URL before the first deployment – a deployment of a repository that is not connected to any addon ends with an error.
Once the repository URL is set, the HTML code editors in the Codes tab are no longer shown — the addon's code is managed through the repository only. The field cannot be cleared in the administration; to disconnect the addon from the repository, see Uninstallation.
Each repository should contain exactly one addon. This keeps the repository structure clean and organized. If you have special needs, e.g. a monorepo, contact your Partner Manager.
Install the GitHub app
You can install the app either on a single repository or on all of your repositories. We recommend the single repository option for more precise control and flexibility.
Make sure your repository has at least one initial commit. After the installation, a file named
.github/workflows/shoptetAddon.workflow.yml is added to your repository automatically, and the installation process
invites a collaborator to the repository. Once these steps are completed, you can proceed with the deployment.
Folder structure
The Addon Repository relies on a specific directory structure when deploying. To deploy a visual addon successfully, you must follow this structure. If you used the Visual Addon Boilerplate, the structure is already in place. Otherwise, follow the structure outlined below:
my-addon/
├─ assets/
│ ├─ font.ttf
│ ├─ picture.png
├─ src/
│ ├─ footer/
│ │ ├─ script1.js
│ │ ├─ script2.js
│ ├─ header/
│ │ ├─ markup.html
│ │ ├─ style.css
│ ├─ orderFinale/
│ │ ├─ remarketing.js
How the build turns this structure into the deployed files is described in Under the hood.
Create a new branch and PR
To create a branch and a pull request (PR), follow the GitHub guide Creating a pull request.
The application will automatically:
- Add a check for the reviewer.
- Add a check for changes to the workflow file.
- Add a notification not to merge the PR yourself.
The merge should be performed by a Shoptet reviewer to ensure a smooth workflow.
The application can also open the pull request for you: push a commit whose message contains Addon check PR to your
branch, and it opens a pull request titled "Addon check pull request" from that branch into the default branch. The
match is case-insensitive and applies to the last commit of the push.
Deployment
A push (or merge) to the main/master branch deploys the addon automatically. To deploy another branch, for example
to test an unapproved addon, go to Actions → Deploy current version → Run workflow and select the branch.
The application creates a deployment, which should appear as green. The green status indicates that the addon's code
has been successfully uploaded to the Content Delivery Network (CDN), so the deployment was successful and the addon is
ready for use.