mirror of
				https://github.com/Brandon-Rozek/website.git
				synced 2025-10-31 13:51:13 +00:00 
			
		
		
		
	Added github actions
This commit is contained in:
		
							parent
							
								
									9b9b51e047
								
							
						
					
					
						commit
						292a8ac8fc
					
				
					 1 changed files with 41 additions and 0 deletions
				
			
		
							
								
								
									
										41
									
								
								.github/workflows/deploy.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								.github/workflows/deploy.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,41 @@ | |||
| name: Build and Deploy Hugo Website | ||||
| 
 | ||||
| on: | ||||
|   push: | ||||
|     branches: main | ||||
| 
 | ||||
| jobs: | ||||
|   build_and_publish: | ||||
|     runs-on: ubuntu-latest | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|         with: | ||||
|           submodules: true | ||||
| 
 | ||||
|       - name: Setup Hugo | ||||
|         env: | ||||
|           HUGO_VERSION: 0.105.0 | ||||
|         run: | | ||||
|           curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz | ||||
|           tar -xvzf hugo.tar.gz | ||||
|           sudo mv hugo /usr/local/bin | ||||
| 
 | ||||
|       - name: Build Hugo Website | ||||
|         id: build | ||||
|         run: | | ||||
|           hugo | ||||
| 
 | ||||
|       - name: Install SSH Key | ||||
|         run: | | ||||
|           install -m 600 -D /dev/null ~/.ssh/id_rsa | ||||
|           echo "${{ secrets.BUILD_SSH_KEY }}" > ~/.ssh/id_rsa | ||||
|           echo "${{ secrets.HOST_KEY }}" > ~/.ssh/known_hosts | ||||
|           echo "Host brandonrozek.com | ||||
|               Hostname brandonrozek.com | ||||
|               user build | ||||
|               IdentityFile ~/.ssh/id_rsa" > ~/.ssh/config | ||||
|        | ||||
|       - name: Deploy | ||||
|         run: ./sync.sh | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue