From df8867b1b4fb2ad6990cb175cba9a285619be598 Mon Sep 17 00:00:00 2001 From: Michael Lombardi Date: Thu, 3 Aug 2023 18:25:33 -0500 Subject: [PATCH] (MAINT) Fix GitHub Pages deployment This change updates the GHA for building and deploying the site to GitHub Pages to use the base url output of the pages setup step as the base url for the build process, instead of hard-coding the canonical URL. Until the site goes public, the URL is non-standard and using the canonical URL breaks the styling and other functionality. This change should be resilient, working even after the site deploys to the canonical URL. --- .github/workflows/publish.site.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.site.yml b/.github/workflows/publish.site.yml index 34c0b16..966a597 100644 --- a/.github/workflows/publish.site.yml +++ b/.github/workflows/publish.site.yml @@ -25,8 +25,10 @@ jobs: with: fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Setup Pages + id: pages uses: actions/configure-pages@v3 - name: Setup Hugo + id: hugo uses: peaceiris/actions-hugo@v2 with: hugo-version: latest @@ -65,7 +67,7 @@ jobs: HUGO_ENVIRONMENT: production HUGO_ENV: production run: | - Invoke-Build -Task BuildSite -SiteBaseUrl https://powershell.github.io/DSC-Samples/ + Invoke-Build -Task BuildSite -SiteBaseUrl "${{ steps.pages.outputs.base_url }}/" - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: