Skip to content

Commit df8867b

Browse files
(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.
1 parent 5652129 commit df8867b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/publish.site.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ jobs:
2525
with:
2626
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
2727
- name: Setup Pages
28+
id: pages
2829
uses: actions/configure-pages@v3
2930
- name: Setup Hugo
31+
id: hugo
3032
uses: peaceiris/actions-hugo@v2
3133
with:
3234
hugo-version: latest
@@ -65,7 +67,7 @@ jobs:
6567
HUGO_ENVIRONMENT: production
6668
HUGO_ENV: production
6769
run: |
68-
Invoke-Build -Task BuildSite -SiteBaseUrl https://powershell.github.io/DSC-Samples/
70+
Invoke-Build -Task BuildSite -SiteBaseUrl "${{ steps.pages.outputs.base_url }}/"
6971
- name: Upload artifact
7072
uses: actions/upload-pages-artifact@v2
7173
with:

0 commit comments

Comments
 (0)