Indigo Tree fork of the WP Engine deploy action. Deploy from a GitHub repo to a WP Engine environment via SSH Gateway and rsync.
One workflow step can run multiple rsync jobs over a single SSH connection by passing a DEPLOYS JSON array.
Pin uses: to a commit SHA or branch.
- Workflow
- Add a deploy workflow under
.github/workflows/(see Example). - Set
DEPLOYSto a JSON array of jobs (see DEPLOYS schema). - Configure branch and environment inputs (
PRD_BRANCH,PRD_ENV, etc.).
- SSH private key (GitHub)
- Generate an SSH key pair if needed.
- Paste the SSH private key (PEM) into your repository or organization secret
WPE_SSHG_KEY_PRIVATE.
- SSH public key (WP Engine)
- Add the public key to SSH Gateway. This action does not use GitPush keys.
- Push to a configured branch. View logs under Actions.
Branch names must match the pushed ref exactly (refs/heads/<name>). Use on.push.branches to match PRD_BRANCH, STG_BRANCH, and DEV_BRANCH.
DEPLOYS is a JSON array inline in the workflow step (DEPLOYS: |).
Each object:
| Field | Required | Description |
|---|---|---|
src |
Yes | Source path in the checkout (globs allowed, e.g. wp-content/plugins/foo-*) |
flags |
Yes | Rsync flags for this job (e.g. -azvr --inplace --exclude-from=.deployignore) |
dest |
No | Destination directory on the server (default "" = site root relative) |
name |
No | Label for logs only |
Jobs run in array order on one SSH session.
Replace multiple uses: deploy steps with one step like this (pin @<commit-sha> after merging this action):
- name: Deploy to WP Engine
uses: indigotree/github-action-deploy-to-wpe@<pin>
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
CACHE_CLEAR: FALSE
PHP_LINT: FALSE
DEV_BRANCH: ${{ env.DEV_BRANCH }}
STG_BRANCH: ${{ env.STG_BRANCH }}
PRD_BRANCH: ${{ env.PRD_BRANCH }}
DEV_ENV: ${{ env.DEV_ENV }}
STG_ENV: ${{ env.STG_ENV }}
PRD_ENV: ${{ env.PRD_ENV }}
DEPLOYS: |
[
{
"name": "plugins-once",
"src": "wp-content/plugins",
"dest": "wp-content",
"flags": "-azvr --inplace --ignore-existing --exclude-from=.deployignore"
},
{
"name": "project-plugins",
"src": "wp-content/plugins/indigotree-site-*",
"dest": "wp-content/plugins",
"flags": "-azvr --inplace --exclude-from=.deployignore"
},
{
"name": "modules",
"src": "wp-content/platform",
"dest": "wp-content",
"flags": "-azvr --inplace --delete --delete-delay --exclude-from=.deployignore"
},
{
"name": "mu-plugins",
"src": "wp-content/mu-plugins",
"dest": "wp-content",
"flags": "-azvr --inplace --exclude-from=.deployignore"
},
{
"name": "theme-and-rest",
"src": ".",
"dest": "",
"flags": "-azvr --inplace --exclude-from=.deployignore --exclude=/*.* --exclude=_wpeprivate/ --exclude=wp-admin/ --exclude=wp-includes/ --exclude=wp-content/plugins/ --exclude=wp-content/platform/ --exclude=wp-content/mu-plugins/ --exclude=wp-content/uploads/ --exclude=wp-content/upgrade*/ --exclude=wp-content/drop-ins/ --exclude=wp-content/languages/ --exclude=mysql.sql --include=/wp-content/themes/ --include=/wp-content/themes/indigotree-theme-2026/*** --exclude=/wp-content/themes/*"
}
]Minimal single-job example:
- uses: actions/checkout@v4
- name: Deploy to WP Engine
uses: indigotree/github-action-deploy-to-wpe@<pin>
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
PRD_BRANCH: main
PRD_ENV: myinstall
DEPLOYS: |
[
{
"src": ".",
"dest": "",
"flags": "-azvr --inplace --exclude-from=.deployignore"
}
]If you previously used several deploy steps with TPO_SRC_PATH, TPO_PATH, and FLAGS:
| Old input | DEPLOYS field |
|---|---|
TPO_SRC_PATH |
src |
TPO_PATH |
dest |
FLAGS |
flags |
- Merge each old step into one object in the
DEPLOYSarray (preserve order). - Use a single
uses:step withDEPLOYS: |. - Set
CACHE_CLEAR: FALSEunless you want a post-deploy flush (default isfalse). - Pin
uses:to the commit SHA that includesDEPLOYSsupport.
WPE_SSHG_KEY_PRIVATE format is unchanged from v0.4.0 (raw PEM in GitHub Secrets).
Removed inputs: TPO_SRC_PATH, TPO_PATH, FLAGS, SCRIPT.
| Name | Type | Usage |
|---|---|---|
DEPLOYS |
string | JSON array of deploy jobs (inline in workflow YAML). |
PRD_BRANCH |
string | Production branch name (exact match to refs/heads/<name>). |
PRD_ENV |
string | WP Engine production environment name. |
WPE_SSHG_KEY_PRIVATE |
secrets | Private SSH key (raw PEM). |
| Name | Type | Usage |
|---|---|---|
STG_BRANCH |
string | Staging branch (exact match). Leave placeholder if unused. |
STG_ENV |
string | WP Engine staging environment. |
DEV_BRANCH |
string | Development branch (exact match). |
DEV_ENV |
string | WP Engine development environment. |
PHP_LINT |
bool | TRUE to run php -l on each job src before deploy. Default false. |
CACHE_CLEAR |
bool | TRUE to flush page and CDN cache after all jobs. Default false. |
See LICENSE.
Copyright (C) 2021-present, Indigo Tree Digital Ltd.
Based on prior work from https://github.com/wpengine/github-action-wpe-site-deploy
Copyright (c) 2021 WP Engine