From 65a75f80e958ffae8d0824e24eda8f849868459d Mon Sep 17 00:00:00 2001 From: Michael Day <108079556+mike-day@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:17:04 -0600 Subject: [PATCH] [NO-JIRA] Include a note about trailing slashes in the SRC_PATH environment variable (#110) [NOJIRA] Include a note about trailing slashes in the SRC_PATH environment variable Also formats the "Deploy Options" table per a linting recommendation. --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 26552af..91d26e5 100644 --- a/README.md +++ b/README.md @@ -99,15 +99,15 @@ jobs: ### Deploy Options -| Name | Type | Usage | -|-|-|-| -| `WPE_ENV` | string | Insert the name of the WP Engine environment you want to deploy to. This also has an alias of `PRD_ENV`, `STG_ENV`, or `DEV_ENV` for multi-step workflows. | -| `SRC_PATH` | string | Optional path to specify a directory within the repo to deploy from. Ex. `"wp-content/themes/genesis-child-theme/"`. Defaults to root of repo filesystem as source. | -| `REMOTE_PATH` | string | Optional path to specify a directory destination to deploy to. Ex. `"wp-content/themes/genesis-child-theme/"` . Defaults to WordPress root directory on WP Engine. | -| `PHP_LINT` | bool | Set to TRUE to execute a php lint on your branch pre-deployment. Default is `FALSE`. | -| `FLAGS` | string | Set optional rsync flags such as `--delete` or `--exclude-from`. The extended example above is excluding paths specified in a `.deployignore` file in the root of the repo. This action defaults to a non-destructive deploy.

For flags that contain whitespace, use single quotes around the flag's value:

`FLAGS: -azvr --filter=':- .gitignore'`

For flags that do not contain whitespace, quotes are unnecessary.

**Default:** `-azvr --inplace --exclude=.*`

_Caution: Setting custom rsync flags replaces the default flags provided by this action. Consider also adding the `-azvr` flags as needed.
`-a` preserves symbolic links, timestamps, user permissions and ownership.
`-z` is for compression
`-v` is for verbose output
`-r` is for recursive directory scanning_| -| `SCRIPT` | string | Remote bash file to execute post-deploy. This can include WP_CLI commands for example. Path is relative to the WP root and file executes on remote. This file can be included in your repo, or be a persistent file that lives on your server. | -| `CACHE_CLEAR` | bool | Optionally clear page and CDN cache post deploy. This takes a few seconds. Default is TRUE. | +| Name | Type | Usage | +|---------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `WPE_ENV` | string | Insert the name of the WP Engine environment you want to deploy to. This also has an alias of `PRD_ENV`, `STG_ENV`, or `DEV_ENV` for multi-step workflows. | +| `SRC_PATH` | string | Optional path to specify a directory within the repo to deploy from. Ex. `"wp-content/themes/genesis-child-theme/"`. Defaults to root of repo filesystem as source.

**Note:** Including a trailing slash ensures that the contents of the specified directory are copied, while omitting the trailing slash results in the directory itself being copied, including its contents. | +| `REMOTE_PATH` | string | Optional path to specify a directory destination to deploy to. Ex. `"wp-content/themes/genesis-child-theme/"` . Defaults to WordPress root directory on WP Engine. | +| `PHP_LINT` | bool | Set to TRUE to execute a php lint on your branch pre-deployment. Default is `FALSE`. | +| `FLAGS` | string | Set optional rsync flags such as `--delete` or `--exclude-from`. The extended example above is excluding paths specified in a `.deployignore` file in the root of the repo. This action defaults to a non-destructive deploy.

For flags that contain whitespace, use single quotes around the flag's value:

`FLAGS: -azvr --filter=':- .gitignore'`

For flags that do not contain whitespace, quotes are unnecessary.

**Default:** `-azvr --inplace --exclude=.*`

_Caution: Setting custom rsync flags replaces the default flags provided by this action. Consider also adding the `-azvr` flags as needed.
`-a` preserves symbolic links, timestamps, user permissions and ownership.
`-z` is for compression
`-v` is for verbose output
`-r` is for recursive directory scanning_ | +| `SCRIPT` | string | Remote bash file to execute post-deploy. This can include WP_CLI commands for example. Path is relative to the WP root and file executes on remote. This file can be included in your repo, or be a persistent file that lives on your server. | +| `CACHE_CLEAR` | bool | Optionally clear page and CDN cache post deploy. This takes a few seconds. Default is TRUE. |