mirror of https://github.com/Hilbis/Hilbish
ci: stop using deprecated method of setting branch name
parent
d5e31850bb
commit
47582e167e
|
@ -21,27 +21,28 @@ jobs:
|
||||||
|
|
||||||
- name: Set branch name
|
- name: Set branch name
|
||||||
id: branch
|
id: branch
|
||||||
|
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
||||||
run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}"
|
run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}"
|
||||||
|
|
||||||
- name: Fix base URL
|
- name: Fix base URL
|
||||||
if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
|
if: env.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
|
||||||
run: sed -i "s%baseURL = 'https://rosettea.github.io/Hilbish/'%baseURL = 'https://rosettea.github.io/Hilbish/versions/${{ steps.branch.outputs.BRANCH_NAME }}'%" website/config.toml
|
run: sed -i "s%baseURL = 'https://rosettea.github.io/Hilbish/'%baseURL = 'https://rosettea.github.io/Hilbish/versions/${{ env.BRANCH_NAME }}'%" website/config.toml
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: 'cd website && hugo --minify'
|
run: 'cd website && hugo --minify'
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: steps.branch.outputs.BRANCH_NAME == 'master' && github.repository_owner == 'Rosettea'
|
if: env.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
|
keep_files: true
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
|
if: env.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
|
||||||
destination_dir: versions/${{ steps.branch.outputs.BRANCH_NAME }}
|
destination_dir: versions/${{ env.BRANCH_NAME }}
|
||||||
keep_files: true
|
keep_files: true
|
||||||
|
|
Loading…
Reference in New Issue