made rsync command more clear.
This commit is contained in:
		
							parent
							
								
									05ed716632
								
							
						
					
					
						commit
						7af8724cea
					
				
					 1 changed files with 15 additions and 2 deletions
				
			
		
							
								
								
									
										17
									
								
								justfile
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								justfile
									
										
									
									
									
								
							| 
						 | 
					@ -8,11 +8,24 @@ DRAFTDIR:='/var/www/draft.gabevenberg.com'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
deploy: clean
 | 
					deploy: clean
 | 
				
			||||||
    hugo --minify
 | 
					    hugo --minify
 | 
				
			||||||
    rsync -rvz --delete public/ {{USER}}@{{HOST}}:{{DIR}} # this will delete everything on the server that's not in the local public folder
 | 
					    rsync \
 | 
				
			||||||
 | 
					    --compress \
 | 
				
			||||||
 | 
					    --delete \
 | 
				
			||||||
 | 
					    --progress \
 | 
				
			||||||
 | 
					    --recursive \
 | 
				
			||||||
 | 
					    --mkpath \
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public/ {{USER}}@{{HOST}}:{{DIR}} # this will delete everything on the server that's not in the local public folder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
deploy-preview: clean
 | 
					deploy-preview: clean
 | 
				
			||||||
    hugo --minify --buildDrafts --buildFuture --baseURL 'https://draft.gabevenberg.com/'
 | 
					    hugo --minify --buildDrafts --buildFuture --baseURL 'https://draft.gabevenberg.com/'
 | 
				
			||||||
    rsync -rvz --delete public/ {{USER}}@{{HOST}}:{{DRAFTDIR}} # this will delete everything on the server that's not in the local public folder
 | 
					    rsync \
 | 
				
			||||||
 | 
					    --compress \
 | 
				
			||||||
 | 
					    --delete \
 | 
				
			||||||
 | 
					    --progress \
 | 
				
			||||||
 | 
					    --recursive \
 | 
				
			||||||
 | 
					    --mkpath \
 | 
				
			||||||
 | 
					    public/ {{USER}}@{{HOST}}:{{DRAFTDIR}} # this will delete everything on the server that's not in the local public folder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean:
 | 
					clean:
 | 
				
			||||||
    -rm -r ./public/
 | 
					    -rm -r ./public/
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue