feat(targets): add deploy-wordpress, a wp-cli backed target - #958
Merged
Conversation
Ships a WordPress plugin or theme to a live install with wp-cli: `wp dist-archive` builds the zip, `wp <plugin|theme> install --force --activate` puts it on the site named by `ssh` or `path`, then the version is read back from `wp <type> get`. Dry runs write a wordpress-package.json plan and never exec wp-cli. Ship refuses to run without `ssh` or `path` so it can't guess which install to write to; auth is the SSH agent's job, so no vault secret. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
| if (!config.ssh && !config.path) { | ||
| throw new Error( | ||
| 'deploy-wordpress requires ssh or path so wp-cli knows which WordPress install to write to. ' | ||
| + 'Set ssh: "user@host:/var/www/html" for a remote site, or path: "/var/www/html" for a local one.', |
ThreatCrush Security Scan311 finding(s) HIGH/CRITICAL: 24 | MEDIUM: 51 | LOW: 236
…and 261 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
packages/targets/deploy-wordpress— a thin adapter over wp-cli that ships a WordPress plugin or theme to a live install.wp dist-archive <src> <out>/<slug>-<version>.zip --format=zip, installingwp-cli/dist-archive-commandfirst if the CLI doesn't have it. Dry runs write awordpress-package.jsonplan and never exec wp-cli.wp <plugin|theme> install <zip> --force --activateagainst the install named byssh(--ssh=user@host:/path) orpath(--path=), then reads the resulting version back fromwp <type> get --field=version.Per the adapter rule in CLI_INTEGRATIONS.md: CLI-first,
dryRunneeds no secrets or network, and every vendor command is logged.shiprefuses to run unlesssshorpathnames an install, so it can never guess which site to write to. Auth rides the SSH agent — nothing goes in the sh1pt vault.Also wires the id into
packages/cli/src/adapter-registry.ts, adds the App-hosting row in TARGETS.md, notes thatplugin-wordpress(still 🚧) is the separate SVN release path to wordpress.org, and registerswpin CLI_INTEGRATIONS.md.Testing
pnpm vitest run packages/targets/deploy-wordpress— 13 testspnpm vitest run— 710 files / 3521 tests pass🤖 Generated with Claude Code