-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (45 loc) · 1.66 KB
/
deploy-production.yml
File metadata and controls
53 lines (45 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Deploy theme to WP Engine Production (entethalliance.org)
# Trigger: push to branch "main"
# One-time setup: https://wpengine.com/support/github-action-deploy/
name: Deploy to WP Engine Production
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set theme version from VERSION
run: |
V=$(cat VERSION | tr -d '\n')
sed -i "s/^Version: .*/Version: $V/" wp-content/themes/wp-starter/style.css
sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$V\"/" wp-content/themes/wp-starter/package.json
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies and build frontend
working-directory: wp-content/themes/wp-starter
run: |
npm ci
npm run build
- name: Deploy theme to WP Engine Production
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
WPE_ENV: ${{ secrets.WPE_PRODUCTION_ENV }}
SRC_PATH: "wp-content/themes/wp-starter/"
REMOTE_PATH: "wp-content/themes/wp-starter/"
PHP_LINT: true
CACHE_CLEAR: false
- name: Deploy mu-plugins to WP Engine Production
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
WPE_ENV: ${{ secrets.WPE_PRODUCTION_ENV }}
SRC_PATH: "wp-content/mu-plugins/"
REMOTE_PATH: "wp-content/mu-plugins/"
CACHE_CLEAR: true