File tree Expand file tree Collapse file tree 4 files changed +57
-20
lines changed Expand file tree Collapse file tree 4 files changed +57
-20
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,20 @@ jobs:
22
22
runs-on : ubuntu-latest
23
23
steps :
24
24
- name : Checkout
25
- uses : actions/checkout@v3
25
+ uses : actions/checkout@v4
26
26
- name : Setup Node v${{ env.NODE_VERSION }}
27
- uses : actions/setup-node@v3
27
+ uses : actions/setup-node@v4
28
28
with :
29
+ cache : npm
29
30
node-version : ${{ env.NODE_VERSION }}
30
31
- name : Install Node packages
31
- run : npm ci
32
+ run : npm install
33
+ - name : Restore cache
34
+ uses : actions/cache@v4
35
+ with :
36
+ path : .next/cache
37
+ key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
38
+ restore-keys : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
32
39
- name : Linting check
33
40
run : npm run lint
34
41
- name : Build
Original file line number Diff line number Diff line change 6
6
- master
7
7
workflow_dispatch :
8
8
9
+ permissions :
10
+ contents : read
11
+ pages : write
12
+ id-token : write
13
+
14
+ concurrency :
15
+ group : " pages"
16
+ cancel-in-progress : false
17
+
9
18
env :
10
19
NODE_VERSION : 22
11
20
12
21
jobs :
13
- deploy :
14
- name : Deploy to GitHub Pages
22
+ build :
23
+ name : Build for GitHub Pages
15
24
runs-on : ubuntu-latest
16
- environment : production
17
25
steps :
18
26
- name : Checkout
19
- uses : actions/checkout@v3
27
+ uses : actions/checkout@v4
20
28
- name : Setup Node v${{ env.NODE_VERSION }}
21
- uses : actions/setup-node@v3
29
+ uses : actions/setup-node@v4
22
30
with :
31
+ cache : npm
23
32
node-version : ${{ env.NODE_VERSION }}
24
33
- name : Install Node packages
25
- run : npm ci
26
- - name : Linting check
27
- run : npm run lint
34
+ run : npm install
35
+ - name : Setup Pages
36
+ id : setup_pages
37
+ uses : actions/configure-pages@v5
38
+ - name : Restore cache
39
+ uses : actions/cache@v4
40
+ with :
41
+ path : .next/cache
42
+ key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
43
+ restore-keys : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
28
44
- name : Build
29
45
run : npm run build
30
- - name : Export
31
- run : npm run export
32
- - name : Deploy to GitHub Pages
33
- uses : JamesIves/github -pages-deploy-action@v4.3.3
46
+ env :
47
+ NEXTJS_BASE_PATH : ${{ steps.setup_pages.outputs.base_path }}
48
+ - name : Upload artifact
49
+ uses : actions/upload -pages-artifact@v3
34
50
with :
35
- branch : gh-pages
36
- folder : out
51
+ path : out
52
+ deploy :
53
+ environment :
54
+ name : github-pages
55
+ url : ${{ steps.deploy_pages.outputs.page_url }}
56
+ runs-on : ubuntu-latest
57
+ needs : build
58
+ steps :
59
+ - name : Deploy to GitHub Pages
60
+ id : deploy_pages
61
+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import type { NextConfig } from 'next' ;
2
+
3
+ const nextConfig : NextConfig = {
4
+ basePath : process . env . NEXTJS_BASE_PATH ,
5
+ output : 'export' ,
6
+ }
7
+
8
+ export default nextConfig ;
You can’t perform that action at this time.
0 commit comments