Skip to content

Deploy your application to Ploi with Github actions

License

Notifications You must be signed in to change notification settings

Glennmen/ploi-deploy-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ploi Deploy Action

Deploy your application to Ploi with Github actions. This action supports both the Deploy webhook URL found in the site repository tab and API based deployment.

Inputs

Webhook deployment

webhook_url

Required Deploy webhook URL. It is advised to use Github secrets to keep your webhook URL private.

The webhook url can be found in your sites Repository tab.

API deployment

api_token

Required Ploi API token. It is advised to use Github secrets to keep your API token private.

The API token can be found in Profile -> API keys.

server_id

Required Ploi Server ID.

Server ID can be found in your servers Settings tab.

site_id

Required Ploi Site ID.

Site ID can be found in your sites Settings tab.

Basic workflows

Webhook deployment

name: 'Deploy on push'

on:
  push:
    branches:
      - master

jobs:
  ploi-deploy:
    name: 'Ploi Deploy'
    runs-on: ubuntu-latest

    steps:
      # Checkout the repository to the GitHub Actions runner
      - name: Checkout
        uses: actions/checkout@v2

      # Trigger Ploi deploy webhook
      - name: Deploy
        uses: Glennmen/ploi-deploy-action@v1.2.0
        with:
          webhook_url: ${{ secrets.WEBHOOK_URL }}

API deployment

name: 'Deploy on push'

on:
  push:
    branches:
      - master

jobs:
  ploi-deploy:
    name: 'Ploi Deploy'
    runs-on: ubuntu-latest

    steps:
      # Checkout the repository to the GitHub Actions runner
      - name: Checkout
        uses: actions/checkout@v2

      # Trigger Ploi deploy api
      - name: Deploy
        uses: Glennmen/ploi-deploy-action@v1.2.0
        with:
          api_token: ${{ secrets.API_TOKEN }}
          server_id: 1
          site_id: 1

Advanced workflows

You can find some common workflows in the example's directory.

Future updates

  • Add API based deploy
    • Flush FastCGI cache
    • Restart daemon
    • Restart service
    • Refresh OPCache

Other suggestions are welcome, please make an issue.