Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/gaupoit/devbanhmi-deploy-trigger/releases/download/v1.0.0/devbanhmi-deploy-trigger.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
WordPress plugin that triggers GitHub Actions workflows when posts are published, updated, or trashed. Built for headless WordPress setups with static site generators like Astro, Next.js, or Hugo.
How It Works
WordPress Post Published/Updated/Trashed
↓
Plugin sends repository_dispatch to GitHub
↓
GitHub Actions workflow runs
↓
Static site rebuilds
Installation
- Download the latest release or clone this repo
- Upload to
/wp-content/plugins/devbanhmi-deploy-trigger/ - Activate the plugin in WordPress admin
- Go to Settings → Deploy Trigger
Configuration
GitHub Token
Create a Personal Access Token at github.com/settings/tokens:
Classic Token:
- Select
reposcope
Fine-Grained Token (recommended):
- Repository access: Select your blog repo only
- Permissions: Contents (Read and write)
GitHub Actions Workflow
Add this workflow to your static site repository at .github/workflows/rebuild.yml:
name: Rebuild Blog
on:
repository_dispatch:
types: [wordpress_publish]
permissions:
contents: write
jobs:
rebuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Trigger rebuild
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git commit --allow-empty -m "Rebuild: ${{ github.event.client_payload.action }} at ${{ github.event.client_payload.time }}"
git push
Features
| Feature | Description |
|---|---|
| Auto-deploy | Triggers on post publish, update, or trash |
| Debounce | 60-second cooldown prevents duplicate triggers |
| Manual trigger | Button in settings for on-demand deploys |
| Encrypted storage | GitHub token encrypted with AUTH_KEY |
| Logging | Last 10 webhook attempts with status |
Settings
| Setting | Description |
|---|---|
| Enable Auto-Deploy | Toggle automatic triggers on/off |
| GitHub Repository | Format: owner/repo |
| GitHub Token | Personal Access Token with repo access |
Webhook Payload
The plugin sends this payload to GitHub:
{
"event_type": "wordpress_publish",
"client_payload": {
"action": "publish|edit|trash|manual",
"time": "2025-01-01 12:00:00"
}
}
Requirements
- WordPress 5.0+
- PHP 7.4+
- GitHub repository with Actions enabled
License
GPL v2 or later
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.
Tag
Published
Assets
Downloads