diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 5795bdc3d..70dc44069 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -10,20 +10,29 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - submodules: true # Fetch Hugo themes (true OR recursive) - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + - name: Checkout submodules + shell: bash + run: | + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.114.0' + hugo-version: '0.120.4' + extended: true - name: Build - run: hugo --minify -s exampleSite --themesDir ../.. + run: | + hugo \ + --minify \ + --themesDir ../.. \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + working-directory: ./exampleSite - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: pages publish_dir: ./exampleSite/public