mirror of
				https://github.com/SamKirkland/FTP-Deploy-Action.git
				synced 2025-10-31 16:03:58 +00:00 
			
		
		
		
	version 4
This commit is contained in:
		
							parent
							
								
									26175f3bf0
								
							
						
					
					
						commit
						07d05bff14
					
				
							
								
								
									
										25
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								README.md
									
									
									
									
									
								
							| @ -2,9 +2,7 @@ | ||||
|   <img alt="FTP Deploy Action - Continuous integration for everyone" src="images/ftp-deploy-logo-small.png"> | ||||
| </p> | ||||
| 
 | ||||
| > :warning: **This is a beta branch, use at your own risk** | ||||
| 
 | ||||
| Automate deploying websites and more with this GitHub action | ||||
| Automate deploying websites and more with this GitHub action. **It's free!** | ||||
| 
 | ||||
|  | ||||
|  | ||||
| @ -25,7 +23,7 @@ jobs: | ||||
|       uses: actions/checkout@v2.3.2 | ||||
|      | ||||
|     - name: 📂 Sync files | ||||
|       uses: SamKirkland/FTP-Deploy-Action@beta-v4 | ||||
|       uses: SamKirkland/FTP-Deploy-Action@4.0.0 | ||||
|       with: | ||||
|         server: ftp.samkirkland.com | ||||
|         username: myFtpUserName | ||||
| @ -35,7 +33,7 @@ jobs: | ||||
| --- | ||||
| 
 | ||||
| ### Requirements | ||||
| - You must have ftp access to your server. If your host requires ssh please use my web-deploy action | ||||
| - You must have ftp access to your server. If your host requires ssh please use my web-deploy action (coming soon) | ||||
| - Some web hosts change the default port (21), check with your host for your port number | ||||
| 
 | ||||
| --- | ||||
| @ -47,6 +45,7 @@ jobs: | ||||
| 4. Paste the example above into your yaml file and save | ||||
| 5. Now you need to add a key to the `secrets` section in your project. To add a `secret` go to the `Settings` tab in your project then select `Secrets`. Add a new `Secret` for `password` | ||||
| 6. Update your yaml file settings | ||||
| 7. If you appreciate this github action give it a :star: or show off with one of the [badges below](#badge). | ||||
| 
 | ||||
| --- | ||||
| 
 | ||||
| @ -57,12 +56,12 @@ To add a `secret` go to the `Settings` tab in your project then select `Secrets` | ||||
| I strongly recommend you store your `password` as a secret. | ||||
| 
 | ||||
| | Key Name                | Required | Example                    | Default Value                                            | Description                                                                                                                                                        | | ||||
| |-------------------------|----------|----------------------------|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||||
| |-------------------------|----------|----------------------------|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||||
| | `server`                | Yes      | `ftp.samkirkland.com`      |                                                          | Deployment destination server                                                                                                                                      | | ||||
| | `username`              | Yes      | `username@samkirkland.com` |                                                          | FTP user name                                                                                                                                                      | | ||||
| | `password`              | Yes      | `CrazyUniquePassword&%123` |                                                          | FTP password, be sure to escape quotes and spaces                                                                                                                  | | ||||
| | `port`                  | No       | `990`                      | `21`                                                     | Server port to connect to (read your web hosts docs)                                                                                                               | | ||||
| | `protocol`              | No       | `ftps`                     | `ftp`                                                    | ftp: provides no encryption, ftps: full encryption newest standard (aka "explicit" ftps), ftps-legacy: full encryption legacy standard (aka "implicit" ftps) | | ||||
| | `protocol`              | No       | `ftps`                     | `ftp`                                                    | `ftp`: provides no encryption, `ftps`: full encryption newest standard (aka "explicit" ftps), `ftps-legacy`: full encryption legacy standard (aka "implicit" ftps) | | ||||
| | `local-dir`             | No       | `./myFolderToPublish/`     | `./`                                                     | Path to upload to on the server, must end with trailing slash `/`                                                                                                  | | ||||
| | `server-dir`            | No       | `public_html/www/`         | `./`                                                     | Folder to upload from, must end with trailing slash `/`                                                                                                            | | ||||
| | `state-name`            | No       | `folder/.sync-state.json`  | `.ftp-deploy-sync-state.json`                            | Path and name of the state file - this file is used to track which files have been deployed                                                                        | | ||||
| @ -99,7 +98,7 @@ jobs: | ||||
|         npm run build | ||||
|      | ||||
|     - name: 📂 Sync files | ||||
|       uses: SamKirkland/FTP-Deploy-Action@beta-v4 | ||||
|       uses: SamKirkland/FTP-Deploy-Action@4.0.0 | ||||
|       with: | ||||
|         server: ftp.samkirkland.com | ||||
|         username: myFtpUserName | ||||
| @ -119,7 +118,7 @@ jobs: | ||||
|       uses: actions/checkout@v2.3.2 | ||||
| 
 | ||||
|     - name: 📂 Sync files | ||||
|       uses: SamKirkland/FTP-Deploy-Action@beta-v4 | ||||
|       uses: SamKirkland/FTP-Deploy-Action@4.0.0 | ||||
|       with: | ||||
|         server: ftp.samkirkland.com | ||||
|         username: myFtpUserName | ||||
| @ -142,7 +141,7 @@ jobs: | ||||
|       uses: actions/checkout@v2.3.2 | ||||
| 
 | ||||
|     - name: 📂 Sync files | ||||
|       uses: SamKirkland/FTP-Deploy-Action@beta-v4 | ||||
|       uses: SamKirkland/FTP-Deploy-Action@4.0.0 | ||||
|       with: | ||||
|         server: ftp.samkirkland.com | ||||
|         username: myFtpUserName | ||||
| @ -154,9 +153,9 @@ _Want another example? Let me know by creating a [github issue](https://github.c | ||||
| 
 | ||||
| --- | ||||
| 
 | ||||
| ## Badges | ||||
| ## Badge | ||||
| 
 | ||||
| If you appreciate this github action give it a :star: or show off with one of the badges below. | ||||
| If you appreciate this github action give it a :star: or show off with one of the badges below. Feel free to edit the text or color. | ||||
| 
 | ||||
| [<img alt="Deployed with FTP Deploy Action" src="https://img.shields.io/badge/Deployed With-FTP DEPLOY ACTION-%3CCOLOR%3E?style=for-the-badge&color=0077b6">](https://github.com/SamKirkland/FTP-Deploy-Action) | ||||
| 
 | ||||
| @ -239,7 +238,7 @@ jobs: | ||||
| This action is a basic wrapper around my `@samkirkland/ftp-deploy` npm package. To test your config you can install [@samkirkland/ftp-deploy](https://github.com/SamKirkland/ftp-deploy) and then convert your config to a yml action. Settings are one-to-one, this action is only a wrapper. | ||||
| 
 | ||||
| ## Contributing to this project | ||||
| To run this code locally you will need to setup docker and act to run a environment similar to the one github uses for actions. | ||||
| To test this action locally you will need to setup **docker** and **act** to run a environment similar to the one github uses for actions. | ||||
| - Download/install docker for windows, make sure it is running | ||||
| - `choco install act-cli` install [act](https://github.com/nektos/act) | ||||
| - Install the npm package using `npm install --dev-only @samkirkland/ftp-deploy` | ||||
|  | ||||
							
								
								
									
										23
									
								
								migration.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								migration.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| # Migrating from v3 to v4 | ||||
| 
 | ||||
| Migrating from v3 to v4 should be fairly straightforward. Version 4 was designed with speed and ease of initial setup in mind. Going forward version 4 will be the only supported version. | ||||
| 
 | ||||
| #### Those who can't upgrade | ||||
| Most features have been carried forward and improved upon. However, some features did not make the cut. | ||||
| - **`sftp` is no longer supported**. If you have `sftp` access you are using `ssh`, that means you have access to a much more modern and capable protocol. I plan on releasing a separate github action that will deploy over `sftp`/`ssh` using `rsync`. Until then you can continue using version 3. | ||||
| - The `include` argument has been removed. I didn't see much need for it in the initial release. If you need this feature please create a support ticket. | ||||
| 
 | ||||
| --- | ||||
| 
 | ||||
| ### How to upgrade | ||||
| 
 | ||||
| 1) Remove `with: fetch-depth: 2`. It is no longer needed and removing it will _slightly_ speed up deployments. | ||||
| 2) Change the version to `4.X.X`, for example `SamKirkland/FTP-Deploy-Action@4.0.0` (please check readme for latest version) | ||||
| 3) If you have a `.git-ftp-include` file you should delete it. Version 4 tracks files differently and no longer needs this config file. | ||||
| 4) If you have a `.git-ftp-ignore` file, you should transfer the options to the new `exclude` argument. _Note: Version 4 excludes any `.git*` and `node_modules/` files/folders by default_ | ||||
| 5) Update your arguments to reflect the following changes | ||||
|     * `ftp-server` was split into 4 arguments. `server`, `port`, `protocol`, and `server-dir`. Transfer your config to these options as needed. | ||||
|     * `ftp-username` was renamed to `username` | ||||
|     * `ftp-password` was renamed to `password` | ||||
|     * `local-dir` and `server-dir` now **must** end with `/` | ||||
|     * `git-ftp-args` and `known-hosts` arguments were removed | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user