29
29
build :
30
30
runs-on : ubuntu-latest
31
31
steps :
32
+
32
33
- name : Checkout 🛎️
33
- uses : actions/checkout@v4.1.3
34
+ uses : actions/checkout@v4
35
+
34
36
- name : Detect package manager
35
37
id : detect-package-manager
36
38
run : |
@@ -48,21 +50,18 @@ jobs:
48
50
echo "Unable to determine packager manager"
49
51
exit 1
50
52
fi
53
+
51
54
- name : Setup Node
52
- uses : actions/setup-node@v3
55
+ uses : actions/setup-node@v4
53
56
with :
54
- node-version : " 20 "
57
+ node-version : " lts/* "
55
58
cache : ${{ steps.detect-package-manager.outputs.manager }}
59
+
56
60
- name : Setup Pages
57
- uses : actions/configure-pages@v3
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
+ uses : actions/configure-pages@v4
62
+
64
63
- name : Restore cache
65
- uses : actions/cache@v3
64
+ uses : actions/cache@v4
66
65
with :
67
66
path : |
68
67
.next/cache
@@ -71,18 +70,19 @@ jobs:
71
70
# If source files changed but packages didn't, rebuild from a prior cache.
72
71
restore-keys : |
73
72
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
73
+
74
74
- name : Install dependencies
75
75
run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
76
+
76
77
- name : Build with Next.js
77
- run : ${{ steps.detect-package-manager.outputs.runner }} build && touch ./out/.nojekyll
78
+ run : ${{ steps.detect-package-manager.outputs.runner }} next build
78
79
env :
79
80
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN : ${{ secrets.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN }}
80
- # - name: Static HTML export with Next.js
81
- # run: ${{ steps.detect-package-manager.outputs.runner }} next export
82
- # - name: Upload artifact
83
- # uses: actions/upload-pages-artifact@v4
84
- # with:
85
- # path: ./out
81
+
82
+ - name : Upload artifact
83
+ uses : actions/upload-pages-artifact@v4
84
+ with :
85
+ path : ./out
86
86
87
87
# Deployment job
88
88
deploy :
92
92
runs-on : ubuntu-latest
93
93
needs : build
94
94
steps :
95
- # - name: Deploy to GitHub Pages
96
- # id: deployment
97
- # uses: actions/deploy-pages@v4
98
- - name : Deploy 🚀
99
- uses : JamesIves/github-pages-deploy-action@v4.6.0
100
- with :
101
- token : ${{ secrets.GITHUB_TOKEN }}
102
- branch : main
103
- folder : out
95
+
96
+ - name : Deploy to GitHub Pages 🚀
97
+ id : deployment
98
+ uses : actions/deploy-pages@v4
0 commit comments