31
31
steps :
32
32
- name : Checkout
33
33
uses : actions/checkout@v4
34
+
34
35
- name : Detect package manager
35
36
id : detect-package-manager
36
37
run : |
@@ -48,19 +49,16 @@ jobs:
48
49
echo "Unable to determine package manager"
49
50
exit 1
50
51
fi
52
+
51
53
- name : Setup Node
52
54
uses : actions/setup-node@v4
53
55
with :
54
- node-version : " 20 "
56
+ node-version : " lts/* "
55
57
cache : ${{ steps.detect-package-manager.outputs.manager }}
58
+
56
59
- name : Setup Pages
57
60
uses : actions/configure-pages@v4
58
- with :
59
- # Automatically inject basePath in your Next.js configuration file and disable
60
- # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
61
- #
62
- # You may remove this line if you want to manage the configuration yourself.
63
- static_site_generator : next
61
+
64
62
- name : Restore cache
65
63
uses : actions/cache@v4
66
64
with :
@@ -71,14 +69,13 @@ jobs:
71
69
# If source files changed but packages didn't, rebuild from a prior cache.
72
70
restore-keys : |
73
71
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
72
+
74
73
- name : Install dependencies
75
74
run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
75
+
76
76
- name : Build with Next.js
77
77
run : ${{ steps.detect-package-manager.outputs.runner }} next build
78
- - name : Static HTML export with Next.js
79
- run : ${{ steps.detect-package-manager.outputs.runner }} run build
80
- - name : List directory contents
81
- run : ls -la
78
+
82
79
- name : Upload artifact
83
80
uses : actions/upload-pages-artifact@v3
84
81
with :
94
91
steps :
95
92
- name : Deploy to GitHub Pages
96
93
id : deployment
97
- uses : actions/deploy-pages@v4
94
+ uses : actions/deploy-pages@v4
0 commit comments