mirror of
				https://github.com/Burnett01/rsync-deployments.git
				synced 2025-11-04 09:29:04 +01:00 
			
		
		
		
	Update README.md
This commit is contained in:
		
							parent
							
								
									f8c929a1f4
								
							
						
					
					
						commit
						7e62b51e32
					
				
					 1 changed files with 22 additions and 12 deletions
				
			
		
							
								
								
									
										34
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								README.md
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -65,12 +65,6 @@ jobs:
 | 
			
		|||
Advanced:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
name: DEPLOY
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
    - master
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  deploy:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
| 
						 | 
				
			
			@ -91,12 +85,6 @@ jobs:
 | 
			
		|||
For better security, I suggest you create additional secrets for remote_host, remote_port and remote_user inputs.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
name: DEPLOY
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
    - master
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  deploy:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
| 
						 | 
				
			
			@ -114,6 +102,28 @@ jobs:
 | 
			
		|||
        remote_key: ${{ secrets.DEPLOY_KEY }}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
For maximum speed limit the checkout action (``actions/checkout@v1``) to a depth of 1:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
jobs:
 | 
			
		||||
  deploy:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v1
 | 
			
		||||
      with:
 | 
			
		||||
        fetch-depth: 1
 | 
			
		||||
    - name: rsync deployments
 | 
			
		||||
      uses: burnett01/rsync-deployments@3.0
 | 
			
		||||
      with:
 | 
			
		||||
        switches: -avzr --delete
 | 
			
		||||
        path: src/
 | 
			
		||||
        remote_path: /var/www/html/
 | 
			
		||||
        remote_host: ${{ secrets.DEPLOY_HOST }}
 | 
			
		||||
        remote_port: ${{ secrets.DEPLOY_PORT }}
 | 
			
		||||
        remote_user: ${{ secrets.DEPLOY_USER }}
 | 
			
		||||
        remote_key: ${{ secrets.DEPLOY_KEY }}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
## Version 2.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue