diff --git a/.changeset/swift-maps-grab.md b/.changeset/swift-maps-grab.md index 3c332a1..aa95556 100644 --- a/.changeset/swift-maps-grab.md +++ b/.changeset/swift-maps-grab.md @@ -2,26 +2,24 @@ "@wpengine/site-deploy": major --- -# Refactor the Main Script +Updates the main script to be more generic, allowing it to be used around different CI/CD Vendors. -Updates the main script to be more generic and allow the script and image to be used around other CI/CD Vendors. - -In order to use this script, each CI/CD vendor will need to set the environment variables accordingly: +In order to use this image, each CI/CD vendor implementation will need to set the environment variables accordingly: ```sh +WPE_ENV # The target WP Engine install name REMOTE_PATH # Default is empty SRC_PATH # Default is the current directory FLAGS # Default is -azvr --inplace --exclude=".*" PHP_LINT # Default is "FALSE" CACHE_CLEAR # Default is "TRUE" SCRIPT # Default is empty -CICD_VENDOR # Default is "wpe-cicd" ``` Example of how to run this image: ```sh - docker run \ + docker run --rm \ -e "WPE_SSHG_KEY_PRIVATE" \ --env-file ./.env \ -v <full_path_of_site>:/site \ diff --git a/.gitignore b/.gitignore index b512c09..1dcef2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +.env \ No newline at end of file diff --git a/README.md b/README.md index f5a6eb8..96e581f 100644 --- a/README.md +++ b/README.md @@ -22,26 +22,25 @@ You can use this image to deploy a site from your local machine. ```sh WPE_ENV=yourinstall # The target WP Engine install name. -GIT_REF=main # Inconsequential, but must be defined for now. REMOTE_PATH= SRC_PATH=. PHP_LINT=TRUE CACHE_CLEAR=TRUE +SCRIPT= ``` 3. Set an environment variable with your private SSH key, replacing the key file name with your own. ```sh -export INPUT_WPE_SSHG_KEY_PRIVATE=`cat ~/.ssh/my_sshg_key_rsa` +export WPE_SSHG_KEY_PRIVATE=`cat ~/.ssh/my_sshg_key_rsa` ``` -4. Replace `/path/to/your/install` with the absolute path to your local site and run the deploy! +4. Run the deploy! ```sh - docker run \ - -e "INPUT_WPE_SSHG_KEY_PRIVATE" \ - -e "INPUT_FLAGS=-azvr --inplace --exclude=\".*\"" \ + docker run --rm \ + -e "WPE_SSHG_KEY_PRIVATE" \ --env-file ./.env \ - -v /Users/marcos.schratzenstaller/workspace/wpe/qpdnpsx22q:/site \ + -v $(pwd):/site \ --workdir=/site \ wpengine/site-deploy:latest ```