Skip to content

Commit 260f6f4

Browse files
committed
Switch to WPE's deployment workflow file.
1 parent fac9cad commit 260f6f4

1 file changed

Lines changed: 27 additions & 15 deletions

File tree

.github/workflows/deployments.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ env:
1717
STG_ENV: berkhamcounsstg
1818
PRD_ENV: berkhamcouns
1919

20-
permissions:
21-
contents: write
22-
deployments: write
23-
statuses: write
24-
2520
jobs:
2621
check-project:
2722
name: Pre-deploy checks
@@ -75,6 +70,19 @@ jobs:
7570
- name: Build assets
7671
run: npm run build
7772

73+
- name: Set WPE_ENV from target branch
74+
run: |
75+
TARGET="${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}"
76+
if [ "$TARGET" = "${{ env.DEV_BRANCH }}" ]; then
77+
echo "WPE_ENV=${{ env.DEV_ENV }}" >> $GITHUB_ENV
78+
elif [ "$TARGET" = "${{ env.STG_BRANCH }}" ]; then
79+
echo "WPE_ENV=${{ env.STG_ENV }}" >> $GITHUB_ENV
80+
elif [ "$TARGET" = "${{ env.PRD_BRANCH }}" ]; then
81+
echo "WPE_ENV=${{ env.PRD_ENV }}" >> $GITHUB_ENV
82+
else
83+
echo "WPE_ENV=example" >> $GITHUB_ENV
84+
fi
85+
7886
- name: Create release on Github
7987
id: create_deployment
8088
uses: octokit/request-action@v2.x
@@ -104,16 +112,17 @@ jobs:
104112
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
105113

106114
- name: Deploy plugins
107-
uses: indigotree/github-action-deploy-to-wpe@v0.5.3
115+
uses: wpengine/github-action-wpe-site-deploy@v3
108116
with:
109117
# Deploy vars
110118
CACHE_CLEAR: FALSE
111119
FLAGS: "-azvr --inplace --verbose --ignore-existing --exclude-from=.deployignore"
112120
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
121+
WPE_ENV: ${{ env.WPE_ENV }}
113122

114123
# PATHS:
115-
TPO_SRC_PATH: "wp-content/plugins"
116-
TPO_PATH: "wp-content"
124+
SRC_PATH: "wp-content/plugins"
125+
REMOTE_PATH: "wp-content"
117126

118127
# Branches & environments
119128
DEV_BRANCH: ${{ env.DEV_BRANCH }}
@@ -124,16 +133,17 @@ jobs:
124133
PRD_ENV: ${{ env.PRD_ENV }}
125134

126135
- name: Deploy (modules)
127-
uses: indigotree/github-action-deploy-to-wpe@v0.5.3
136+
uses: wpengine/github-action-wpe-site-deploy@v3
128137
with:
129138
# Deploy vars
130139
CACHE_CLEAR: FALSE
131140
FLAGS: "-azvr --inplace --verbose --delete --delete-delay --exclude-from=.deployignore"
132141
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
142+
WPE_ENV: ${{ env.WPE_ENV }}
133143

134144
# PATHS:
135-
TPO_SRC_PATH: "wp-content/platform"
136-
TPO_PATH: "wp-content"
145+
SRC_PATH: "wp-content/platform"
146+
REMOTE_PATH: "wp-content"
137147

138148
# Branches & environments
139149
DEV_BRANCH: ${{ env.DEV_BRANCH }}
@@ -144,10 +154,10 @@ jobs:
144154
PRD_ENV: ${{ env.PRD_ENV }}
145155

146156
- name: Deploy (theme, and everything else)
147-
uses: indigotree/github-action-deploy-to-wpe@v0.5.3
157+
uses: wpengine/github-action-wpe-site-deploy@v3
148158
with:
149159
# Deploy vars
150-
CACHE_CLEAR: FALSE
160+
CACHE_CLEAR: TRUE
151161
FLAGS: >-
152162
-azvr --inplace --verbose
153163
--exclude-from=.deployignore
@@ -167,9 +177,11 @@ jobs:
167177
--include='/wp-content/themes/indigotree-theme-2025/***'
168178
--exclude='/wp-content/themes/*'
169179
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
180+
WPE_ENV: ${{ env.WPE_ENV }}
181+
170182
# PATHS:
171-
TPO_SRC_PATH: "."
172-
TPO_PATH: ""
183+
SRC_PATH: "."
184+
REMOTE_PATH: ""
173185

174186
# Branches & environments
175187
DEV_BRANCH: ${{ env.DEV_BRANCH }}

0 commit comments

Comments
 (0)