Getting the GitHub Access Token

  • Visit the Personal access tokens page to obtain your access token. Click on “Generate new token” and choose the “classic” option.
  • When choosing the classic token option, select only the “repos” option and do not set an expiration time. Remember to give a name to your token so that you can identify it later.
  • Finally, click on “Generate token” at the bottom of the page. Your access token will be displayed for you to copy.

Configuring the Access Token in Square Cloud

  • After obtaining the access token, go to the dashboard, select your app, navigate to the Deploy section, and paste your token in the corresponding field. Click on “Save”.
  • After saving, a URL webhook will be displayed that you need to copy.

Configuring the Square Cloud Webhook on GitHub

  • Now, access your application’s repository (which can be private or public) and go to “Deploy”. Then, click on “Webhooks” and then on “Add Webhook”.
  • Paste your webhook in the Payload URL field, set the Content Type to application/json, and click on “Add Webhook”.

Setting a branch for webhook

  • If you want to set a branch for the webhook, you can set a query parameter in the webhook URL.
  • Access the webhook Payload URL field in your GitHub repository and insert on the end of the webhook URL ?branch=name where name is the name of the desired branch.

In this example, the desired branch will be main

Deploy

  • If you have followed all the steps correctly, simply commit to your repository. Your application on Square Cloud will be updated.

If you continue to experience any issues, please don’t hesitate to contact our support team.