Giter VIP home page Giter VIP logo

github-action-wpengine-git-deploy's Introduction

GitHub Action for WP Engine Git Deployments

An action to deploy your repository to a WP Engine site via git. Read more about WP Engine's git deployment support.

Example GitHub Action workflow

workflow "Deploy to WP Engine" {
  on = "push"
  resolves = ["Git Push to Production"]
}

action "Git Push to Production" {
  uses = "jovrtn/github-action-wpengine-git-deploy@master"
  env = {
    WPENGINE_ENVIRONMENT_NAME   = "my-cool-site-production"
  }
  secrets = [
    "WPENGINE_SSH_KEY_PRIVATE",
    "WPENGINE_SSH_KEY_PUBLIC"
  ]
}

Environment Variables & Secrets

Required

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.

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 master.

Further reading

Setting up your SSH keys

  1. 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.
  2. Store your public and private keys in your GitHub repository as new 'Secrets' (under your repository settings), using the names WPENGINE_SSH_KEY_PRIVATE and WPENGINE_SSH_KEY_PUBLIC respectively. In theory, this replaces the need for encryption on the key itself, since GitHub repository secrets are encrypted by default.
  3. Add the public key to your target WP Engine environment.
  4. Per the WP Engine documentation, it takes about 30-45 minutes for the new SSH key to become active.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.