mirror of
				https://github.com/easingthemes/ssh-deploy.git
				synced 2025-10-30 23:30:09 +08:00 
			
		
		
		
	[init]: Add Source dir parameter
This commit is contained in:
		
							parent
							
								
									65ac047ad6
								
							
						
					
					
						commit
						544c80dc4a
					
				
							
								
								
									
										15
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								Dockerfile
									
									
									
									
									
								
							| @ -1,27 +1,22 @@ | ||||
| FROM debian:9.5-slim | ||||
| 
 | ||||
| 
 | ||||
| # Update | ||||
| RUN apt-get update | ||||
| 
 | ||||
| 
 | ||||
| # Install packages | ||||
| RUN apt-get -yq install rsync openssh-client | ||||
| 
 | ||||
| 
 | ||||
| # Label | ||||
| LABEL "com.github.actions.name"="rsync deployments" | ||||
| LABEL "com.github.actions.description"="For deploying code to a webserver via rsync over ssh" | ||||
| LABEL "com.github.actions.name"="ssh deployments" | ||||
| LABEL "com.github.actions.description"="For deploying code over ssh" | ||||
| LABEL "com.github.actions.icon"="truck" | ||||
| LABEL "com.github.actions.color"="yellow" | ||||
| 
 | ||||
| LABEL "repository"="http://github.com/contention/rsync-deployments" | ||||
| LABEL "homepage"="https://github.com/contention/rsync-deployments" | ||||
| LABEL "maintainer"="Contention <hello@contention.agency>" | ||||
| 
 | ||||
| LABEL "repository"="http://github.com/easingthemes/ssh-deployments" | ||||
| LABEL "homepage"="https://github.com/easingthemes/ssh-deployment" | ||||
| LABEL "maintainer"="Dragan Filipovic <info@frontenddot.com>" | ||||
| 
 | ||||
| # Copy entrypoint | ||||
| ADD entrypoint.sh /entrypoint.sh | ||||
| RUN chmod +x /entrypoint.sh | ||||
| ENTRYPOINT ["/entrypoint.sh"] | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @ -1,8 +1,8 @@ | ||||
| # rsync deployments | ||||
| # ssh deployments | ||||
| 
 | ||||
| This GitHub Action deploys *everything* in `GITHUB_WORKSPACE` to a folder on a server via rsync over ssh.  | ||||
| This GitHub Action deploys specific directory from `GITHUB_WORKSPACE` to a folder on a server via rsync over ssh.  | ||||
| 
 | ||||
| This action would usually follow a build/test action which leaves deployable code in `GITHUB_WORKSPACE`. | ||||
| This action would usually follow a build/test action which leaves deployable code in `GITHUB_WORKSPACE`, eg `dist`; | ||||
| 
 | ||||
| # Required SECRETs | ||||
| 
 | ||||
| @ -16,7 +16,9 @@ This action can receive three `ARG`s: | ||||
| 
 | ||||
| 2. The second is for any `--exclude` flags and directory pairs, eg: `--exclude .htaccess --exclude /uploads/`. Use "" if none required. | ||||
| 
 | ||||
| 3. The third is for the deployment target, and should be in the format: `[USER]@[HOST]:[PATH]` | ||||
| 3. The third is for the source target, path relative to `$GITHUB_WORKSPACE` root, eg: `dist` | ||||
| 
 | ||||
| 4. The fourth is for the deployment target, and should be in the format: `[USER]@[HOST]:[PATH]` | ||||
| 
 | ||||
| # Example usage | ||||
| 
 | ||||
|  | ||||
| @ -10,4 +10,4 @@ chmod 600 "$SSH_PATH/deploy_key" | ||||
| 
 | ||||
| 
 | ||||
| # Do deployment | ||||
| sh -c "rsync $1 -e 'ssh -i $SSH_PATH/deploy_key -o StrictHostKeyChecking=no' $2 $GITHUB_WORKSPACE/ $3" | ||||
| sh -c "rsync $1 -e 'ssh -i $SSH_PATH/deploy_key -o StrictHostKeyChecking=no' $2 $GITHUB_WORKSPACE/$3 $4" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Dragan Filipovic
						Dragan Filipovic