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