GitHub Webhooks
Update Your Website with GitHub Webhooks and Plesk
If you keep your website files in GitHub, you can set up automatic deployment using GitHub webhooks and Plesk. This means every time you push changes to your GitHub repository, your site will update automatically, with no need to manually upload files via FTP or the Plesk file manager.
Add GitHub Repo to Plesk
1) To to GitHub, and copy the link to clone your repository.
2) Login to your HelioHost account and navigate to:
Plesk > Websites & Domains > [ domain ] > Dashboard > Dev Tools > click on the Git button
3) Click on the blue Add Repository button.
4) In the Repository URL field, paste in the web URL provided to you by GitHub.
5) If you want files deployed to the webroot folder, leave the Server path set to /httpdocs. If you prefer to deploy files to a directory, enter it as /httpdocs/foldername
6) Click on the blue Create button.
7) You should see a success message of Deploying files to domain.helioho.st and a link to Open the Git repository
8) You should be able to visit your deployed site on HelioHost.
Setup GitHub Webhooks
To enable Plesk to get notifications of changes you make to files in your GitHub repo, so it can automatically deploy the updates to HelioHost for you, use the webhooks feature.
1) Inside Plesk, go back to the Git section, and click on the Repository settings button.
2) Copy the Webhook URL
3) Go to your GitHub repo, and go to Settings > Webhooks
4) Click on the Add webhook button.
5) Paste the Webhook URL you copied from Plesk into the Payload URL field in GitHub.
6) Click on the Add webhook button.
7) You should see a success message of Okay, that hook was successfully created. We sent a ping payload to test it out!
8) Update your site files, then commit and push the code changes to your GitHub repo.
9) The code changes will be deployed by Plesk, and your HelioHost website will reflect the latest changes.
Troubleshooting
Fatal: You are on a branch yet to be born
If you get an error message of fatal: You are on a branch yet to be born
Make sure your GitHub repo is not empty.
Destination path already exists and is not an empty directory
If you get an error of fatal: destination path '/home/domain.helioho.st/git/repo_name.git' already exists and is not an empty directory
Delete the existing repo folder inside Plesk > Home directory > git > repo_name and add the Repository URL again.
Fatal: could not read Username for github.com: No such device or address
If you get an error of Cloning into bare repository /home/domain.heliohost.us/git/repo_name.git fatal: could not read Username for github.com: No such device or address
Make sure you provided the correct GitHub repo URL.
References
This tutorial is adapted from user-provided information in the Adding Git Submodules post on the HelioNet forum.
Further Support
If this tutorial has not worked for you, please go back and check all of your steps again to make sure you didn't miss anything. If you can't figure out what is wrong, please post in the Customer Service forum, making sure to provide your username and any error message(s) received.