airvzxf/FTP Deployment
Copy all the files and folders via FTP from your Git project to your server in a specific path, delete remote folder before.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| server | FTP Server. | yes | — |
| user | FTP User. | yes | — |
| password | FTP Password. | yes | — |
| local_dir | Local directory. | no | ./ |
| remote_dir | Remote directory. | no | ./ |
| delete | Delete all the files inside of the remote directory. | no | false |
| max_retries | Number of times the lftp command will be executed on error. `0` means retry forever (the only exits are lftp success or the global 5h timeout). `1` means no retries. | no | 10 |
| no_symlinks | Do not create symbolic links. | no | true |
| mirror_verbose | Mirror verbosity level (0-3). Passed as --verbose=N to lftp mirror. | no | 1 |
| ftp_ssl_allow | FTP - Allow SSL encryption. | no | true |
| ssl_verify_certificate | Verify SSL certificate. | no | true |
| ssl_check_hostname | Check certificate hostname. | no | true |
| ftp_passive_mode | FTP - This can be useful if you are behind a firewall or a dumb masquerading router. | no | true |
| ftp_use_feat | FTP - FEAT: Determining what extended features the FTP server supports. | no | false |
| ftp_nop_interval | FTP - Delay in seconds between NOOP commands when downloading tail of a file. | no | 2 |
| net_max_retries | NET - Maximum number of operation without success. 0 unlimited. 1 no retries. | no | 1 |
| net_persist_retries | NET - Ignore hard errors. When reply 5xx errors or there is too many users. | no | 5 |
| net_timeout | NET - Sets the network protocol timeout. | no | 15s |
| dns_max_retries | DNS - 0 no limit trying to lookup an address otherwise try only this number of times. | no | 8 |
| dns_fatal_timeout | DNS - Time for DNS queries. Set to "never" to disable. | no | 10s |
| lftp_settings | Additional raw lftp settings, e.g. "set cache:cache-empty-listings true; set cmd:status-interval 1s;". Use with care: this is appended to the lftp `-e` command and not validated. | no | "" |
| exclude | Comma-separated glob patterns to exclude from the upload. Translated to `set mirror:exclude <value>;` in lftp. Files matching any pattern are neither uploaded nor deleted. Example: "*.map,node_modules/**,.git/**". Globs are case-sensitive (lftp native syntax). | no | "" |
| exclude_delete | Comma-separated glob patterns to protect from deletion when `delete: true` is set. Translated to `set mirror:exclude-file <value>;` in lftp. Independent of `exclude`: files matching these patterns are still uploaded if present locally, but are not removed by `--delete`. Example: "*.log,uploads/**". | no | "" |
| debug | If "true", print resolved input values to the log. Default is "false" (only show which inputs were received, not their values). | no | false |
| fail_on_deprecated | If "true", exit 1 when the ref used to invoke this action is end-of-life (v1.0-alpha.*, v1.1, v1.2.0, v1.3.*). Useful for orgs with a "no EOL versions" policy. The deprecation warning is still printed either way; this input only controls whether the action fails. | no | false |
| dry_run | If "true", perform a dry run: lftp will compute the mirror plan but not transfer or delete any file. Useful to preview what the action would change before a destructive run. The action still exits 0 on success (i.e. on a clean dry-run plan) and 1 on a hard error. | no | false |
| upload_log_on_failure | If "true" (default), when the action is about to exit 1, the captured lftp log file is uploaded to the current workflow run as a workflow artifact named "ftp-deployment-action-log-<run-attempt>". Requires the step to expose GITHUB_TOKEN via `env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}`. If the token (or any of the other GitHub-Actions env vars) is missing, the upload is silently skipped with a notice and the action still exits 1 normally. If the upload request itself fails (network, 4xx, 5xx), a warning is printed and the action still exits 1. Set to "false" to disable the upload entirely (the log file is still captured under ~/.lftp-logs/ for the runner to inspect). | no | true |
| concurrency_lock | If "true", serialize concurrent deployments to the same FTP server by acquiring a server-side sentinel directory before the mirror. Implementation: lftp issues `quote MKD <path>` before the mirror and `quote RMD <path>` after; while MKD returns 550 (lock held), the action polls up to `concurrency_lock_timeout` seconds. Uses RFC 959 MKD/RMD which every FTP server supports. The lock is released on any exit path (success, error, SIGINT, 5h timeout) by the cleanup trap. Default is "false" (no cross-runner serialization). For zero-config serialization, prefer the GitHub Actions `concurrency:` block in your workflow. Stale-lock auto-recovery (v2.9.0): if the previous holder died before RMD (runner OOM, SIGKILL, 6h job limit), a timestamp-encoded sentinel file is left at the FTP root; the next runner detects it as stale (older than `concurrency_lock_timeout`) and takes over automatically. See README "Concurrency / deployment lock" for details. | no | false |
| concurrency_lock_path | Path of the sentinel directory used by `concurrency_lock`. Relative paths are resolved against the FTP user's home; absolute paths are accepted. Must be a valid FTP path (no `..`, no shell metacharacters, no leading dash). Default: ".lftp-deployment.lock" (a hidden directory alongside the deployed files). The directory will be created and removed by the action; do not use a path that holds user data. | no | .lftp-deployment.lock |
| concurrency_lock_timeout | Maximum seconds to wait for the lock when `concurrency_lock` is "true" and another run is currently holding it. After this, the action exits 1 with a clear error. Set to "0" to fail immediately when the lock is held (no waiting). Default is 300 (5 minutes), which is long enough to ride out a transient concurrent run, short enough that a stale lock surfaces within a normal workflow run. | no | 300 |
| concurrency_lock_poll_interval | Seconds between lock acquisition attempts when `concurrency_lock` is "true". Default is 5, which gives 60 attempts over the default 300-second timeout. Lower values reduce the time-to-acquire after the holder releases; higher values reduce the number of MKD round-trips against the server. | no | 5 |
Outputs
no outputs