Skip to content

Commit 00e20fe

Browse files
committed
More attempts to fix base path
1 parent 6331b50 commit 00e20fe

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/nextjs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,17 @@ jobs:
8686
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
8787
- name: Install dependencies
8888
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
89+
- name: Set base path
90+
id: set-base-path
91+
run: |
92+
if [ -n "${{ vars.SITE_BASE_PATH }}" ]; then
93+
echo "base_path=${{ vars.SITE_BASE_PATH }}" >> $GITHUB_OUTPUT
94+
else
95+
echo "base_path=/${{ github.event.repository.name }}" >> $GITHUB_OUTPUT
96+
fi
8997
- name: Build with Next.js
9098
env:
91-
PAGES_BASE_PATH: /convex.world
99+
PAGES_BASE_PATH: ${{ steps.set-base-path.outputs.base_path }}
92100
run: ${{ steps.detect-package-manager.outputs.runner }} next build
93101
- name: Upload artifact
94102
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)