mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	ci: output website builds from other branches to different dirs
This commit is contained in:
		
							parent
							
								
									9c6d6c4f31
								
							
						
					
					
						commit
						a37f8e3b30
					
				
							
								
								
									
										20
									
								
								.github/workflows/website.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/workflows/website.yml
									
									
									
									
										vendored
									
									
								
							@ -1,10 +1,8 @@
 | 
				
			|||||||
name: Build website
 | 
					name: Build website
 | 
				
			||||||
 | 
					
 | 
				
			||||||
on:
 | 
					on:
 | 
				
			||||||
  push:
 | 
					  - push
 | 
				
			||||||
    branches:
 | 
					  - pull_request
 | 
				
			||||||
      - master
 | 
					 | 
				
			||||||
      - docs-refactor
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  deploy:
 | 
					  deploy:
 | 
				
			||||||
@ -24,8 +22,22 @@ jobs:
 | 
				
			|||||||
      - name: Build
 | 
					      - name: Build
 | 
				
			||||||
        run: 'cd website && hugo --minify'
 | 
					        run: 'cd website && hugo --minify'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Set branch name
 | 
				
			||||||
 | 
					        id: branch
 | 
				
			||||||
 | 
					        run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Deploy
 | 
					      - name: Deploy
 | 
				
			||||||
 | 
					        if: steps.branch.outputs.BRANCH_NAME == 'master' && github.repository_owner == 'Rosettea'
 | 
				
			||||||
        uses: peaceiris/actions-gh-pages@v3
 | 
					        uses: peaceiris/actions-gh-pages@v3
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          github_token: ${{ secrets.GITHUB_TOKEN }}
 | 
					          github_token: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
          publish_dir: ./website/public
 | 
					          publish_dir: ./website/public
 | 
				
			||||||
 | 
					          keep_files: true
 | 
				
			||||||
 | 
					      - name: Deploy
 | 
				
			||||||
 | 
					        if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
 | 
				
			||||||
 | 
					        uses: peaceiris/actions-gh-pages@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          github_token: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
 | 
					          publish_dir: ./website/public
 | 
				
			||||||
 | 
					          destination_dir: versions/${( steps.branch.outputs.BRANCH_NAME }}
 | 
				
			||||||
 | 
					          keep_files: true
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user