site_files_deploy
Deploy site files by fetching a git repository or tarball directly on the server, placing them into the site's web root with proper ownership. Preview with dry_run, execute with confirm.
Instructions
Deploy site files onto the host by fetching them ON the server (no local copy needed) — git clone or a downloaded tarball — into the site's web root, then chowning to the site's system user. Resolves index_dir + owner via site_get. The fetch runs as root on the panel host; only https:// sources are accepted. source_type 'git': shallow-clones source (optionally at ref) and copies the tree (excluding .git) into the destination. source_type 'tarball': curls the archive and extracts it; a single wrapping top-level directory (e.g. GitHub's repo-main/) is descended into automatically. Existing files are overwritten; nothing is deleted. dest_subpath is relative to the web root. WRITE — dry_run:true to preview, confirm:true to execute. Requires SSH (FASTPANEL_SSH_HOST).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | git branch/tag to check out (source_type=git only). Omit for the default branch. | |
| source | Yes | https:// git repo URL (source_type=git) or https:// .tar.gz archive URL (source_type=tarball) | |
| confirm | No | ||
| dry_run | No | ||
| site_id | Yes | Site id from sites_list | |
| source_type | No | git = clone a repo; tarball = download and extract a .tar.gz | git |
| dest_subpath | No | Destination relative to the site web root. Omit for the web root itself. |