From d7dde44a0c501d0187a74a12f8372b96e9169063 Mon Sep 17 00:00:00 2001 From: sammyette Date: Fri, 14 Apr 2023 01:23:24 -0400 Subject: [PATCH] ci: (attempt to) fix base url on non-master versions --- .github/workflows/website.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index dd71799..f5c116d 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -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