Skip to content

Commit

Permalink
Try changing baseURL
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Jan 22, 2025
1 parent 6360e98 commit 1613ab6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
env:
HUGO_ENVIRONMENT: preview
run: |
echo "Building site with baseURL: https://${{ github.repository_owner }}.github.io/${{ github.repository }}/pr-preview/pr-${{ github.event.number }}/"
hugo --environment preview --baseURL "https://${{ github.repository_owner }}.github.io/${{ github.repository }}/pr-preview/pr-${{ github.event.number }}/" --minify -d public
echo "Building site with baseURL: https://${{ github.repository_owner }}.github.io/pr-preview/pr-${{ github.event.number }}/"
hugo --environment preview --baseURL "https://${{ github.repository_owner }}.github.io/pr-preview/pr-${{ github.event.number }}/" --minify -d public
- name: List Public Directory
if: github.event.action != 'closed'
Expand All @@ -51,11 +51,12 @@ jobs:
if: github.event.action != 'closed'
run: |
echo "Checking base URL in generated HTML files:"
grep -r "https://${{ github.repository_owner }}.github.io/${{ github.repository }}/pr-preview/pr-${{ github.event.number }}/" public || echo "Base URL not found in some files"
grep -r "https://${{ github.repository_owner }}.github.io/pr-preview/pr-${{ github.event.number }}/" public || echo "Base URL not found in some files"
- name: Deploy PR Preview
uses: rossjrw/pr-preview-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
source-dir: ./public
action: auto
pages-base-url: https://${{ github.repository_owner }}.github.io/
action: auto

0 comments on commit 1613ab6

Please sign in to comment.