An action to deploy your repository to a WP Engine site via git. Read more about WP Engine's git deployment support.
name: CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v1
- name: Deploy to WP-Engine
uses: PhinCo/github-action-wpengine-git-deploy@7 # Note, the `@7` is the release name
env:
WPENGINE_ENVIRONMENT_NAME: [your wpengine environement name]
WPENGINE_SSH_KEY_PRIVATE: ${{ secrets.WPENGINE_SSH_KEY_PRIVATE }} # Configured in Repo/Settings/Secrets
WPENGINE_SSH_KEY_PUBLIC: ${{ secrets.WPENGINE_SSH_KEY_PUBLIC }} # Configured in Repo/Settings/Secrets
Name | Type | Usage |
---|---|---|
WPENGINE_ENVIRONMENT_NAME |
Environment Variable | The name of the WP Engine environment you want to deploy to. |
WPENGINE_SSH_KEY_PRIVATE |
Secret | Private SSH key of your WP Engine git deploy user. See below for SSH key usage. |
WPENGINE_SSH_KEY_PUBLIC |
Secret | Public SSH key of your WP Engine git deploy user. See below for SSH key usage. |
Name | Type | Usage |
---|---|---|
WPENGINE_ENVIRONMENT |
Environment Variable | Defaults to production . You shouldn't need to change this, but if you're using WP Engine's legacy staging, you can override the default and set to staging if needed. |
LOCAL_BRANCH |
Environment Variable | Set which branch in your repository you'd like to push to WP Engine. Defaults to master . |
- Generate a new SSH key pair as a special deploy key. The simplest method is to generate a key pair with a blank passphrase, which creates an unencrypted private key.
- Store your public and private keys in your GitHub repository as new 'Secrets' (under your repository settings), using the names
WPENGINE_SSH_KEY_PRIVATE
andWPENGINE_SSH_KEY_PUBLIC
respectively. In theory, this replaces the need for encryption on the key itself, since GitHub repository secrets are encrypted by default. - Add the public key to your target WP Engine environment.
- Per the WP Engine documentation, it takes about 30-45 minutes for the new SSH key to become active.