In order to trigger deployments from your GitHub actions, we'll need to do a call to the deploy webhook URL in order for Ploi to know your application has to be deployed.
Glenn has created an excellent GitHub action that's available on the marketplace for you to use.
This action allows you to deploy in 2 ways, the webhook that's provided by Ploi in the repository tab, or via the API.
Glenn has also made sure there's a few examples available for you to have a flying start:
To do a call from your GitHub action, we'll need an additional plugin from the GitHub market place. You have a few options for this, we'll list the tested options here:
With these plugins, you'll be able to send cURL calls to the Ploi deploy webhook URL. To get this deploy webhook URL, visit your site in ploi.io and press the repository tab. Next scroll down until you see the Deploy Webhook URL card:
Copy this URL and enter this part inside your GitHub action file (this example uses the first plugin listed above):
jobs: deployment: - name: Deploy To Ploi uses: fjogeleit/http-request-action@master with: url: 'https://ploi.io/webhooks/servers/1/sites/1/deploy?token=xxx' method: 'POST'
Make sure to replace the URL with your deploy webhook URL.