Generate the deploy kit
generate_deploy_kitRenders a Plesk deployment kit for a project, showing file diffs and a write plan first; writes only approved files inside the repository and refuses secret-like content.
Instructions
Renders the deploy kit for a project from explicit parameters: .github/workflows/deploy-plesk.yml and deploy/plesk/ (build-bundle.sh, the -deploy release manager, deploy.conf.example, server-setup.sh, the database dump helper, PM2 or systemd definitions, optional nginx directives, README.md). A DRY RUN by default: it returns each file’s action and a diff (against the vetted template for a new file, against the current file for an existing one) and writes nothing. With write: true it writes inside the repository root only, never through a symlink, never deletes, and never replaces an existing file unless its path is listed in overwrite. Values it doesn’t know are left as FILL IN and listed. Use it in phase 5, after the user agreed the plan; write only after they saw the diff. Refuses to write a kit that contains anything that looks like a secret.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | The app name used by the release manager (<app>-deploy, /etc/<app>/) | |
| nginx | No | Only if the proxy needs changing; a working proxy is left alone | none |
| parts | No | Generate only these parts | |
| stack | Yes | Which build-bundle.sh branch builds the release | |
| write | No | false (default): return the plan and diffs, write nothing | |
| branch | No | The production branch | main |
| app_user | No | The account that runs the app, from the server. Left as FILL IN if unknown | |
| base_dir | Yes | BASE on the server: where releases/, current and shared/ live | |
| database | No | Adds the pre-migration dump for this engine | none |
| env_file | No | The app's env file on the server (default /etc/<app>/app.env) | |
| pm2_apps | No | Each PM2 process: its name, its folder in the release, its script, and arguments | |
| pm2_home | No | An absolute path on the server | |
| site_url | Yes | The public site, checked from outside after each deploy | |
| app_group | No | A Linux user or group name | |
| overwrite | No | Existing files that may be replaced. List one only after showing the user what is there and getting agreement | |
| proxy_port | No | A TCP port | |
| static_dir | No | Static sites: the build output folder (default dist) | |
| ci_workflow | No | The existing CI workflow the deploy calls for its tests | ci.yml |
| deploy_user | No | The SSH account GitHub Actions uses (default <app>-deploy) | |
| migrate_cmd | No | A shell command written into deploy.conf (this server never runs it) | |
| php_version | No | ||
| project_dir | No | Absolute path of the repository root. Defaults to the open project in Claude Code. | |
| checkout_env | No | The env file inside the folder production runs from today | |
| node_bin_dir | No | The folder with the node (and pm2) the app uses, e.g. /opt/plesk/node/24/bin | |
| shared_links | No | ||
| health_checks | Yes | What the release manager checks after the switch; prefer the app’s own port, e.g. http://127.0.0.1:3001/health | |
| systemd_units | No | ||
| required_files | No | ||
| build_time_vars | No | Public build-time values (repository variables), names only | |
| php_fpm_service | No | The domain's FPM service, e.g. plesk-php83-fpm | |
| post_switch_cmd | No | A shell command written into deploy.conf (this server never runs it) | |
| process_manager | Yes | What the server reloads after the switch; keep what runs today | |
| checkout_uploads | No | Run-time files inside the folder production runs from today | |
| health_commit_url | No | A URL whose answer must contain the release’s commit | |
| public_health_url | Yes | A public URL whose answer contains the deployed commit (a health endpoint or version.json) | |
| runtime_env_names | No | Names for the placeholder env file server-setup.sh creates, never values | |
| not_deployed_paths | No | Path prefixes whose changes are tested but not deployed (.md files never deploy) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adapt | Yes | ||
| files | Yes | ||
| secrets | Yes | ||
| written | Yes | ||
| warnings | Yes | ||
| project_dir | Yes |