Added: Gitea Workflow
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build and Deploy Zola Website / build_and_deploy (push) Successful in 11s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build and Deploy Zola Website / build_and_deploy (push) Successful in 11s
				
			This commit is contained in:
		
							
								
								
									
										29
									
								
								.gitea/workflows/deploy.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.gitea/workflows/deploy.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					name: Build and Deploy Zola Website
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches:
 | 
				
			||||||
 | 
					      - master
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  HOST: ${{ secrets.SERVER_IP }}
 | 
				
			||||||
 | 
					  SSH_USERNAME: ${{ secrets.USERNAME }}
 | 
				
			||||||
 | 
					  SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
 | 
				
			||||||
 | 
					  DEST_FOLDER: "/srv/www/cz/filiprojek/fuelstats"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  build_and_deploy:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout Repository
 | 
				
			||||||
 | 
					        uses: actions/checkout@v4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Deploy
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          apt update -y && apt-get install -y --no-install-recommends rsync
 | 
				
			||||||
 | 
					          eval "$(ssh-agent -s)"
 | 
				
			||||||
 | 
					          ssh-add - <<< "${SSH_PRIVATE_KEY}"
 | 
				
			||||||
 | 
					          mkdir -p ~/.ssh/
 | 
				
			||||||
 | 
					          ssh-keyscan -H ${HOST} >> ~/.ssh/known_hosts
 | 
				
			||||||
 | 
					          rsync -r --delete-after public/* "${SSH_USERNAME}@${HOST}:${{ env.DEST_FOLDER }}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Reference in New Issue
	
	Block a user