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 15
15
# Allows you to run this workflow manually from the Actions tab
16
16
workflow_dispatch :
17
17
18
+ env :
19
+ NEXT_PUBLIC_BASE_PATH : ${{ vars.NEXT_PUBLIC_BASE_PATH }}
20
+
18
21
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
19
22
permissions :
20
23
contents : read
76
79
- name : Install dependencies
77
80
run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
78
81
79
- - name : Build with Next.js
82
+ - name : Build with Next.js (No base path)
83
+ if : ${{ env.NEXT_PUBLIC_BASE_PATH == '' }}
80
84
run : ${{ steps.detect-package-manager.outputs.runner }} next build
81
85
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
+
82
90
- name : Add .nojekyll to out directory
83
91
run : touch out/.nojekyll
84
92
Original file line number Diff line number Diff line change 1
1
module . exports = {
2
2
reactStrictMode : true ,
3
3
output : 'export' ,
4
- basePath : "" ,
4
+ basePath : process . env . NEXT_PUBLIC_BASE_PATH || "" ,
5
5
images : {
6
6
unoptimized : true ,
7
7
} ,
You can’t perform that action at this time.
0 commit comments