mirror of
				https://github.com/easingthemes/ssh-deploy.git
				synced 2025-10-30 23:30:09 +08:00 
			
		
		
		
	feat: use ssh key type
This commit is contained in:
		
							parent
							
								
									f2f261e6bd
								
							
						
					
					
						commit
						6a0bdabd30
					
				
							
								
								
									
										12
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								README.md
									
									
									
									
									
								
							| @ -37,19 +37,23 @@ eg: myusername | ||||
| 
 | ||||
| eg: '59184' | ||||
| 
 | ||||
| ##### 5. `ARGS` (optional, default '-rltgoDzvO') | ||||
| ##### 5. `REMOTE_KEY_TYPES` (optional, default '+ssh-rsa') | ||||
| 
 | ||||
| eg: '+ssh-rsa,+ssh-dss' | ||||
| 
 | ||||
| ##### 6. `ARGS` (optional, default '-rltgoDzvO') | ||||
| 
 | ||||
| For any initial/required rsync flags, eg: `-avzr --delete` | ||||
| 
 | ||||
| ##### 6. `SOURCE` (optional, default '') | ||||
| ##### 7. `SOURCE` (optional, default '') | ||||
| 
 | ||||
| The source directory, path relative to `$GITHUB_WORKSPACE` root, eg: `dist/` | ||||
| 
 | ||||
| ##### 7. `TARGET` (optional, default '/home/REMOTE_USER/') | ||||
| ##### 8. `TARGET` (optional, default '/home/REMOTE_USER/') | ||||
| 
 | ||||
| The target directory | ||||
| 
 | ||||
| ##### 8. `EXCLUDE` (optional, default '') | ||||
| ##### 9. `EXCLUDE` (optional, default '') | ||||
| 
 | ||||
| path to exclude separated by `,`, ie: `/dist/, /node_modules/` | ||||
| 
 | ||||
|  | ||||
| @ -15,6 +15,10 @@ inputs: | ||||
|     description: "Remote port" | ||||
|     required: false | ||||
|     default: "22" | ||||
|   REMOTE_KEY_TYPES: | ||||
|     description: "Remote key types" | ||||
|     required: false | ||||
|     default: "+ssh-rsa" | ||||
|   SOURCE: | ||||
|     description: "Source directory" | ||||
|     required: false | ||||
|  | ||||
| @ -6,14 +6,18 @@ const { addSshKey } = require('./sshKey'); | ||||
| 
 | ||||
| const { | ||||
|   REMOTE_HOST, REMOTE_USER, | ||||
|   REMOTE_PORT, SSH_PRIVATE_KEY, DEPLOY_KEY_NAME, | ||||
|   REMOTE_PORT, REMOTE_KEY_TYPES, SSH_PRIVATE_KEY, DEPLOY_KEY_NAME, | ||||
|   SOURCE, TARGET, ARGS, EXCLUDE, | ||||
|   GITHUB_WORKSPACE | ||||
| } = require('./inputs'); | ||||
| 
 | ||||
| const defaultOptions = { | ||||
|   ssh: true, | ||||
|   sshCmdArgs: ['-o StrictHostKeyChecking=no'], | ||||
|   sshCmdArgs: [ | ||||
|     '-o StrictHostKeyChecking=no', | ||||
|     `-o HostKeyAlgorithms=${REMOTE_KEY_TYPES || '+ssh-rsa'}`, | ||||
|     `-o PubkeyAcceptedKeyTypes=${REMOTE_KEY_TYPES || '+ssh-rsa'}`, | ||||
|   ], | ||||
|   recursive: true | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| const inputNames = ['REMOTE_HOST', 'REMOTE_USER', 'REMOTE_PORT', 'SSH_PRIVATE_KEY', 'DEPLOY_KEY_NAME', 'SOURCE', 'TARGET', 'ARGS', 'EXCLUDE']; | ||||
| const inputNames = ['REMOTE_HOST', 'REMOTE_USER', 'REMOTE_PORT', 'REMOTE_KEY_TYPES', 'SSH_PRIVATE_KEY', 'DEPLOY_KEY_NAME', 'SOURCE', 'TARGET', 'ARGS', 'EXCLUDE']; | ||||
| 
 | ||||
| const inputs = { | ||||
|   GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Alan Vasquez
						Alan Vasquez