Skip to content

Commit 3764de6

Browse files
committed
Change WPENGINE_SITE env var name to better reflect WP Engine's site/environment structure.
1 parent ccdec6d commit 3764de6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ workflow "Deploy to WP Engine" {
1313
action "Git Push to Production" {
1414
uses = "jovrtn/github-action-wpengine-deploy@master"
1515
env = {
16-
WPENGINE_SITE = "my-cool-wordpress-site"
17-
WPENGINE_ENVIRONMENT = "production"
16+
WPENGINE_ENVIRONMENT_NAME = "my-cool-site-production"
1817
}
1918
secrets = [
2019
"WPENGINE_SSH_KEY_PRIVATE",
@@ -29,15 +28,15 @@ action "Git Push to Production" {
2928

3029
| Name | Type | Usage |
3130
|-|-|-|
32-
| `WPENGINE_SITE` | Environment Variable | The name of the WP Engine site you want to deploy to. |
31+
| `WPENGINE_ENVIRONMENT_NAME` | Environment Variable | The name of the WP Engine environment you want to deploy to. |
3332
| `WPENGINE_SSH_KEY_PRIVATE` | Secret | Private SSH key of your WP Engine git deploy user. See below for SSH key usage. |
3433
| `WPENGINE_SSH_KEY_PUBLIC` | Secret | Public SSH key of your WP Engine git deploy user. See below for SSH key usage. |
3534

3635
### Optional
3736

3837
| Name | Type | Usage |
3938
|-|-|-|
40-
| `WPENGINE_ENVIRONMENT` | Environment Variable | The site's environment you want to deploy to, e.g. production, staging, development. Defaults to `production` |
39+
| `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. |
4140

4241
### Further reading
4342

entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
: ${WPENGINE_SITE?Required environment variable not set.}
5+
: ${WPENGINE_ENVIRONMENT_NAME?Required environment name variable not set.}
66
: ${WPENGINE_SSH_KEY_PRIVATE?Required secret not set.}
77
: ${WPENGINE_SSH_KEY_PUBLIC?Required secret not set.}
88

@@ -27,5 +27,5 @@ chmod 600 "$WPENGINE_SSH_KEY_PRIVATE_PATH"
2727
chmod 644 "$WPENGINE_SSH_KEY_PUBLIC_PATH"
2828

2929
git config core.sshCommand "ssh -i $WPENGINE_SSH_KEY_PRIVATE_PATH -o UserKnownHostsFile=$KNOWN_HOSTS_PATH"
30-
git remote add $WPENGINE_ENV git@$WPENGINE_HOST:$WPENGINE_ENV/$WPENGINE_SITE.git
31-
git push -f $WPENGINE_ENV master
30+
git remote add $WPENGINE_ENV git@$WPENGINE_HOST:$WPENGINE_ENV/$WPENGINE_ENVIRONMENT_NAME.git
31+
git push -fu $WPENGINE_ENV master

0 commit comments

Comments
 (0)