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 Example
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@v2
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12.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: uship/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/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.
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.