3.9 KiB
3.9 KiB
Cloudways Deployment Plan (Revised: Strategy B - Temp Path + Hooks)
This document outlines the plan to transition the project development workflow to a Cloudways staging server and configure automated deployment via Git. This plan uses the Revised Strategy B, where the deployment branch (cloudways-dev) contains the plugin code plus essential development folders, and Cloudways uses a temporary deployment path with post-deployment hooks.
Phase 1: Project Cleanup & Restructure (on cloudways-dev branch) - Completed
- Goal: Prepare the
cloudways-devbranch for deployment while retaining essential development folders. - Actions Performed:
- The branch was initially cleaned to contain only the
hvac-community-eventsplugin folder. - Essential development folders (
.roo/,docs/,memory-bank/,.roomodes) were restored from commitb1522bad. - A
.gitignorefile was added to ignore everything excepthvac-community-events/and.gitignoreitself (Note: This only affects untracked files; the restored folders are tracked and will be deployed). - The resulting state (plugin + essential folders +
.gitignore) was force-pushed to the remotecloudways-devbranch.
- The branch was initially cleaned to contain only the
Phase 2: Cloudways Git Deployment Configuration (User Action - Strategy B)
- Goal: Configure Cloudways to automatically deploy only the plugin from the
cloudways-devbranch into the correct server path. - Prerequisites: Cloudways SSH key generated and added as a Deploy Key in the GitHub repository settings (
bengizmo/upskill-event-manager). - Actions (to be performed by the user in the Cloudways UI):
- Navigate to the target Application Settings -> Deployment Via Git.
- Set the Git Remote Address (SSH URL):
git@github.com:bengizmo/upskill-event-manager.git - Select the Branch:
cloudways-dev - Set the Deployment Path to a temporary location: e.g.,
/home/master/git_deploys/upskill-event-manager - Add Post-Deployment Commands to copy only the plugin to the correct location:
# Remove the old plugin directory (use -f to avoid errors if it doesn't exist) echo "Removing existing plugin directory..." rm -rf /home/master/applications/uberrxmprk/public_html/wp-content/plugins/hvac-community-events # Copy the newly deployed plugin directory from the temporary location echo "Copying new plugin directory..." cp -R /home/master/git_deploys/upskill-event-manager/hvac-community-events /home/master/applications/uberrxmprk/public_html/wp-content/plugins/ # Optional: Clear cache if WP-CLI is installed # echo "Flushing WP cache..." # wp cache flush --path=/home/master/applications/uberrxmprk/public_html || true echo "Plugin deployment script finished." - Click "Start Deployment" to perform the initial deployment.
- Verify that only the
hvac-community-eventsdirectory appears correctly in/home/master/applications/uberrxmprk/public_html/wp-content/plugins/on the server via SSH/SFTP or the WordPress admin panel. Check thatdocs/,memory-bank/etc. are not copied into the plugins directory.
Phase 3: Workflow Considerations
- Branching: The
cloudways-devbranch contains the plugin and essential development files. - Development: Make code changes on this branch or your primary development branch. If using a separate primary branch, ensure changes are merged/cherry-picked to
cloudways-devbefore deployment. - Deployment Trigger: Push the updated
cloudways-devbranch to trigger the Cloudways deployment (if auto-deploy is enabled) or manually trigger deployment in the Cloudways UI.
Phase 4: Memory Bank Update (Roo Action)
- The Memory Bank files (
decisionLog.md,activeContext.md,progress.md) on the main development branch will be updated to reflect this final strategy.