{"id":21488533,"url":"https://github.com/dsabre/deploy-ftp","last_synced_at":"2025-03-17T10:43:04.493Z","repository":{"id":57109875,"uuid":"425815237","full_name":"dsabre/deploy-ftp","owner":"dsabre","description":"Build and deploy a nodejs application (such as React, Angular, Vue ecc...).","archived":false,"fork":false,"pushed_at":"2021-11-12T09:35:46.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T12:48:45.151Z","etag":null,"topics":["deploy","deployment","ftp","ftp-deploy","ftp-deployment"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsabre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-08T11:44:12.000Z","updated_at":"2022-02-03T18:37:14.000Z","dependencies_parsed_at":"2022-08-20T20:20:30.163Z","dependency_job_id":null,"html_url":"https://github.com/dsabre/deploy-ftp","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsabre%2Fdeploy-ftp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsabre%2Fdeploy-ftp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsabre%2Fdeploy-ftp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsabre%2Fdeploy-ftp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsabre","download_url":"https://codeload.github.com/dsabre/deploy-ftp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244019573,"owners_count":20384789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deploy","deployment","ftp","ftp-deploy","ftp-deployment"],"created_at":"2024-11-23T14:09:58.806Z","updated_at":"2025-03-17T10:43:04.471Z","avatar_url":"https://github.com/dsabre.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/daniele.sabre"],"categories":[],"sub_categories":[],"readme":"# Nodejs FTP deploy\n\nBuild and deploy a nodejs application (such as React, Angular, Vue ecc...).\n\nFrom version 1.1.2, using `DSDEPLOY_FTP_PREDEPLOY` variable, you can deploy anything, even not a site.\n\n[![Version](https://img.shields.io/npm/v/@dsabre/deploy-ftp?style=for-the-badge)](https://www.npmjs.com/package/@dsabre/deploy-ftp)\n[![License: MIT](https://img.shields.io/npm/l/@dsabre/deploy-ftp?registry_uri=https%3A%2F%2Fregistry.npmjs.org\u0026style=for-the-badge)](https://github.com/dsabre/deploy-ftp/blob/main/LICENSE)\n[![Downloads](https://img.shields.io/npm/dw/@dsabre/deploy-ftp?style=for-the-badge)](https://www.npmjs.com/package/@dsabre/deploy-ftp)\n[![GitHub issues](https://img.shields.io/github/issues-raw/dsabre/deploy-ftp?style=for-the-badge)](https://github.com/dsabre/deploy-ftp/issues)\n[![Dependencies](https://img.shields.io/librariesio/release/npm/@dsabre/deploy-ftp?style=for-the-badge)](https://www.npmjs.com/package/@dsabre/deploy-ftp)\n\n\n## Configuration\n\nCreate a **.env.local** file in your project directory with following variables:\n\n| Environment variable              | Type       | Description                                                                                                                                                                                                        |\n| :-------------------------------- | :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `DSDEPLOY_FTP_USER`               | `string`   | **Required**. FTP username                                                                                                                                                                                         |\n| `DSDEPLOY_FTP_HOST`               | `string`   | **Required**. FTP host                                                                                                                                                                                             |\n| `DSDEPLOY_FTP_PASSWORD`           | `string`   | FTP password (prompted if none given)                                                                                                                                                                              |\n| `DSDEPLOY_FTP_PORT`               | `integer`  | FTP port (default 21)                                                                                                                                                                                              |\n| `DSDEPLOY_FTP_REMOTE_DIR`         | `string`   | Remote directory name where file will be placed, will use the project directory name if not provided                                                                                                               |\n| `DSDEPLOY_FTP_LOCAL_DIR`          | `string`   | Local directory to upload, will look for the dist or build directory if not provided                                                                                                                               |\n| `DSDEPLOY_FTP_DELETE_REMOTE`      | `integer`  | Set to `0` or `1` to delete remote files before upload (default `0`)                                                                                                                                               |\n| `DSDEPLOY_FTP_FORCE_PASSIVE_MODE` | `integer`  | Set to `0` or `1` to use passive mode (default `1`)                                                                                                                                                                |\n| `DSDEPLOY_FTP_USE_SFTP`           | `integer`  | Set to `0` or `1` to use SFTP (default `0`)                                                                                                                                                                        |\n| `DSDEPLOY_FTP_PREDEPLOY`          | `string`   | Execute commands before deploy, you can define multiple commands to execute by separating them with a semicolon. If you don't want to execute any commands, set the variable to `none` (default: `npm run build`). |\n\n### Example of a .env.local with default/example values\n```dotenv\nDSDEPLOY_FTP_USER=yourftpusername\nDSDEPLOY_FTP_HOST=host.example.xyz\nDSDEPLOY_FTP_PASSWORD=yourpassword\nDSDEPLOY_FTP_PORT=21\nDSDEPLOY_FTP_REMOTE_DIR=remote-directory\nDSDEPLOY_FTP_LOCAL_DIR=dist\nDSDEPLOY_FTP_DELETE_REMOTE=0\nDSDEPLOY_FTP_FORCE_PASSIVE_MODE=1\nDSDEPLOY_FTP_USE_SFTP=0\nDSDEPLOY_FTP_PREDEPLOY=\"npm run build\"\n```\n\n\n## Usage\n\nUse this command to deploy to your FTP server:\n\n```bash\nnpx @dsabre/deploy-ftp\n```\n\nOptionally, you can pass the name of the environment variables file as a command parameter:\n\n```bash\nnpx @dsabre/deploy-ftp .env\n```\n\nor with any name you want:\n\n```bash\nnpx @dsabre/deploy-ftp myEnvFile.txt\n```\n\n\n## Contributing\n\nFor contributions, issues and feature requests please check [issues page](https://github.com/dsabre/deploy-ftp/issues).\n\n\n## Authors\n\n- [Daniele Sabre](https://github.com/dsabre)\n\n\n## Support me\n\u003ca href=\"https://www.buymeacoffee.com/daniele.sabre\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/dsabre/dsabre/main/images/bmc.png\" alt=\"Buy Me a Coffee\" title=\"Buy Me a Coffee\" height=\"50\" /\u003e\n\u003c/a\u003e\n\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsabre%2Fdeploy-ftp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsabre%2Fdeploy-ftp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsabre%2Fdeploy-ftp/lists"}