Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:

concurrency: preview-${{ github.ref }}

permissions:
contents: read
pages: write
actions: write
permissions: write-all
# contents: write # TODO: do we want this?
# pages: write
# actions: write

jobs:
deploy-preview:
Expand All @@ -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: ${{ github.repository_owner }}.github.io
action: auto
2 changes: 1 addition & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ hero_section:
btn_link: /
- title: Neurodata Without Borders
subtitle: Version 2.0 FINAL Now Available
btn_text: Read More
btn_text: This is a test
btn_link: /
banner_section:
enable: true
Expand Down
Loading