@@ -30,67 +30,29 @@ jobs:
3030 runs-on : ubuntu-latest
3131 steps :
3232 - name : Checkout
33- uses : actions/checkout@v3
34- - name : Detect package manager
35- id : detect-package-manager
36- working-directory : ./website
37- run : |
38- if [ -f "${{ github.workspace }}/yarn.lock" ]; then
39- echo "manager=yarn" >> $GITHUB_OUTPUT
40- echo "command=install" >> $GITHUB_OUTPUT
41- echo "runner=yarn" >> $GITHUB_OUTPUT
42- exit 0
43- elif [ -f "${{ github.workspace }}/package.json" ]; then
44- echo "manager=npm" >> $GITHUB_OUTPUT
45- echo "command=ci" >> $GITHUB_OUTPUT
46- echo "runner=npx --no-install" >> $GITHUB_OUTPUT
47- exit 0
48- else
49- echo "Unable to determine package manager"
50- exit 1
51- fi
33+ uses : actions/checkout@v4
5234 - name : Setup Node
53- uses : actions/setup-node@v3
54- with :
55- node-version : " 18"
56- cache : ${{ steps.detect-package-manager.outputs.manager }}
57- - name : Setup Pages
58- uses : actions/configure-pages@v3
35+ uses : actions/setup-node@v4
5936 with :
60- # Automatically inject basePath in your Next.js configuration file and disable
61- # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
62- #
63- # You may remove this line if you want to manage the configuration yourself.
64- static_site_generator : next
65- - name : Restore cache
66- uses : actions/cache@v3
67- with :
68- path : |
69- .next/cache
70- # Generate a new cache whenever packages or source files change.
71- key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
72- # If source files changed but packages didn't, rebuild from a prior cache.
73- restore-keys : |
74- ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
37+ node-version : " 22"
38+ cache : ' npm'
7539 - name : Install dependencies
7640 working-directory : ./website
77- run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
41+ run : npm install
7842 - name : Build with Next.js
7943 working-directory : ./website
80- run : ${{ steps.detect-package-manager.outputs.runner }} npm run build
44+ run : |
45+ npm run build
8146 - name : Upload artifact
82- uses : actions/upload-pages-artifact@v2
47+ uses : actions/upload-pages-artifact@v3
8348 with :
8449 path : ./website/out
8550
8651 # Deployment job
8752 deploy :
88- environment :
89- name : github-pages
90- url : ${{ steps.deployment.outputs.page_url }}
9153 runs-on : ubuntu-latest
9254 needs : build
9355 steps :
9456 - name : Deploy to GitHub Pages
9557 id : deployment
96- uses : actions/deploy-pages@v2
58+ uses : actions/deploy-pages@v4
0 commit comments