Created
July 28, 2021 20:10
-
-
Save okadots/edfb39335aef7b1d6cdb5c0a145ef8dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a workflow to compile and deploy to WPEngine Production | |
name: PROD Deploy to WPEngine | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the release-1 branch | |
push: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 | |
node-version: '14.6' | |
- run: cd project/themes/your-theme && npm install | |
- name: Compile production assets | |
run: cd project/themes/your-theme && npm run build | |
- name: Remove node_modules | |
run: cd project/themes/your-theme && rm -Rf node_modules | |
- name: Deploy WordPress to WP Engine | |
# You may pin to the exact commit or the version. | |
# uses: wpengine/github-action-wpe-site-deploy@78e54ef1e8ce6591267521095a03e304a2b837f1 | |
uses: wpengine/github-action-wpe-site-deploy@main | |
env: | |
# Keys, lint & url options | |
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPENGINE_SSH_KEY_PRIVATE }} | |
PHP_LINT: FALSE | |
TPO_SRC_PATH: "project/*" | |
TPO_PATH: "wp-content" | |
# Branches & Environments | |
PRD_BRANCH: main | |
PRD_ENV: yoursitename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment