Hjälpcentral

knowledgebase

ypsilon.kb.documentation
Server & Hosting Management

Deploying via Git

  • 17 Hjälpte svaret dig?

If you manage your code in GitHub or GitLab, you can use Plesk's Git extension to continuously deploy your updates to the server without needing FTP.

Connecting a Git Repository

  1. Go to Websites & Domains and click the Git button.
  2. Select your repository type (Local if you want to push to Plesk, or Remote if you want Plesk to pull from GitHub/GitLab). For this example, choose Remote.
  3. Paste the Clone URL of your repository (e.g., `git@github.com:youruser/yourrepo.git`).
  4. If your repository is private, Plesk will generate an SSH Public Key. You MUST copy this key and add it to your GitHub/GitLab Deployment Keys in order to grant Plesk read access!
  5. Select the branch to deploy (usually `main` or `master`).
  6. Click OK.

Enabling Auto-Deployment via Webhooks

You don't want to click a button in Plesk manually every time you push code! After setting up the repository in Plesk, go to the Repository Settings. You will see a Webhook URL.

Copy this URL, log into GitHub, go to your repository's Settings > Webhooks, and add it. Now, every time you run `git push`, GitHub will ping Plesk, and Plesk will instantly pull the latest code and deploy it to your `httpdocs` directory!

Hjälpte svaret dig?

Relaterade artiklar