You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An action to deploy a WordPress project to a WP Engine site via git. Read more about WP Engine's git deployment support.
Usage
Create a .github/workflows/ci.yml file in your project repo.
Add the following code to the ci.yml file
name: CI Workflow
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout files and setup environment
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Set up authentication for SatisPress packages
run: composer config ${{ secrets.SATISPRESS_URL }} ${{ secrets.SATISPRESS_API_KEY }} satispress
- name: Install project dependencies
run: composer install --no-dev -o
- name: Build theme assets
run: npm install && npm run build
working-directory: wp-content/themes/your-theme
- name: Deploy
uses: colis/action-deploy-to-wpengine@main
env:
WPENGINE_ENVIRONMENT_NAME: ${{ secrets.WPENGINE_ENVIRONMENT_NAME }}
WPENGINE_SSH_PRIVATE_KEY: ${{ secrets.WPENGINE_SSH_PRIVATE_KEY }}
WPENGINE_SSH_PUBLIC_KEY: ${{ secrets.WPENGINE_SSH_PUBLIC_KEY }}
Create a .github/assets/.gitignore-wpe file in your project repo containing untracked files and folders that WP Engine should ignore.
Create a .github/assets/blocklist file in your project repo containing all files and folders that should not be copied to the WP Engine server with git push - e.g.
The name of the WP Engine environment you want to deploy to.
WPENGINE_SSH_PRIVATE_KEY
Secret
Private SSH key of your WP Engine git deploy user. See below for SSH key usage.
WPENGINE_SSH_PUBLIC_KEY
Secret
Public SSH key of your WP Engine git deploy user. See below for SSH key usage.
Optional
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 main.
SATISPRESS_URL
Secret
The URL of your private SatisPress packagist repository.
SATISPRESS_API_KEY
Secret
The API Key of your private SatisPress packagist repository.
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_PRIVATE_KEY and WPENGINE_SSH_PUBLIC_KEY 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.