File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1515 # Allows you to run this workflow manually from the Actions tab
1616 workflow_dispatch :
1717
18+ env :
19+ NEXT_PUBLIC_BASE_PATH : ${{ vars.NEXT_PUBLIC_BASE_PATH }}
20+
1821# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1922permissions :
2023 contents : read
7679 - name : Install dependencies
7780 run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
7881
79- - name : Build with Next.js
82+ - name : Build with Next.js (No base path)
83+ if : ${{ env.NEXT_PUBLIC_BASE_PATH == '' }}
8084 run : ${{ steps.detect-package-manager.outputs.runner }} next build
8185
86+ - name : Build with Next.js (With base path)
87+ if : ${{ env.NEXT_PUBLIC_BASE_PATH != '' }}
88+ run : NEXT_PUBLIC_BASE_PATH=${{ env.NEXT_PUBLIC_BASE_PATH }} ${{ steps.detect-package-manager.outputs.runner }} next build
89+
8290 - name : Add .nojekyll to out directory
8391 run : touch out/.nojekyll
8492
Original file line number Diff line number Diff line change 11module . exports = {
22 reactStrictMode : true ,
33 output : 'export' ,
4- basePath : "" ,
4+ basePath : process . env . NEXT_PUBLIC_BASE_PATH || "" ,
55 images : {
66 unoptimized : true ,
77 } ,
You can’t perform that action at this time.
0 commit comments