mirror of https://github.com/Hilbis/Hilbish
ci: output website builds from other branches to different dirs
parent
9c6d6c4f31
commit
a37f8e3b30
|
@ -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…
Reference in New Issue