ci: (attempt to) fix base url on non-master versions

doc-opts
sammyette 2023-04-14 01:23:24 -04:00
parent 237b306eb8
commit d7dde44a0c
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 7 additions and 3 deletions

View File

@ -19,13 +19,17 @@ jobs:
hugo-version: 'latest'
extended: true
- name: Build
run: 'cd website && hugo --minify'
- name: Set branch name
id: branch
run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}"
- name: Fix base URL
if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
run: sed -i "s%baseURL = 'https://rosettea.github.io/Hilbish/'%https://rosettea.github.io/Hilbish/versions/${{ steps.branch.outputs.BRANCH_NAME }}%" website/config.toml
- name: Build
run: 'cd website && hugo --minify'
- name: Deploy
if: steps.branch.outputs.BRANCH_NAME == 'master' && github.repository_owner == 'Rosettea'
uses: peaceiris/actions-gh-pages@v3