Is this article helpful?
 
(optional) let us know why:

Github webhooks

Github webhooks let you set up webhooks to your Github repositories, allowing you to automatically update and deploy your plugins from your plentymarkets inbox.

Note: This is the recommended way of deploying plugins on Windows 10.

Setup

Go to Github and create a new personal access token. This token is used for authenticating your Github account in plentymarkets.

  1. Go to https://github.com/settings/tokens.
  2. Click on Generate new token.
  3. Enter a token description, e.g. the plugin name.
  4. Under Select scopes, activate repo:status to access the commit status.
    → The status is required to inform you about successful or failed deployment of plugins.
  5. Click on Generate token.
    → The personal access token will be generated.
  6. Click on Copy token to copy the token to the clipboard.
    → In the plentymarkets back end, this token will be used instead of your Github password.

Back end configuration

Open your plentymarkets back end and add your Git plugin to your system.

  1. Go to Plugins » Git.
  2. Click on New plugin.
    → The Settings window will open.
  3. Enter the remote URL of your Github repository.
  4. Enter your Github user name.
  5. Paste the copied personal access token into the Password field.
  6. Click on Test connection.
    → The connection to the Github repository is verified and established and a token is generated.
  7. Copy the token to the clipboard.
    → This token is required in step 3.
  8. Select the branch of the repository you want to clone.
  9. Save the settings.
    → The plugin repository is copied to the plentymarkets inbox.

Github configuration

Go to your Github repository and set up a new webhook for the repository.

  1. Go to Github.
  2. Under Your repositories, click on the plugin repository.
    → The Code tab will open.
  3. Click on the Settings tab.
  4. Click on Webhooks.
  5. Click on Add webhook.
  6. Enter the Payload URL.
    → The payload URL consists of your online store URL and /rest/plugins/hook, e.g. https://www.your-plentystore.co.uk/rest/plugins/hook.
  7. Select application/json from the Content type drop-down menu.
  8. Paste the copied token into the Secret field.
    → This token is used for securing the communication between Github and plentymarkets.
  9. For Which events would you like to trigger this webhook?, select Just the push event.
  10. Click on Add webhook.
    → The webhook will be displayed under Webhooks.

Usage

When making changes to your Github repository and committing the changes, your plugin will be updated and deployed automatically via the webhook. Changes will be visible shortly after the commit. You can check whether or not the commit was deployed successfully by following these steps:

  1. Go to Github.
  2. Under Your repositories, click on the plugin repository.
    → The Code tab will open.
  3. In the list of Commits, the commit is flagged Pending while deploying the plugin.
    → After a short while, Pending will change to Success if updating and deploying was successful or to Failure if the deployment failed.