3131 steps :
3232 - name : Checkout
3333 uses : actions/checkout@v4
34+
35+ - name : Setup pnpm
36+ 37+ with :
38+ version : 10.12.1
39+
3440 - name : Detect package manager
3541 id : detect-package-manager
3642 run : |
@@ -39,20 +45,27 @@ jobs:
3945 echo "command=install" >> $GITHUB_OUTPUT
4046 echo "runner=yarn" >> $GITHUB_OUTPUT
4147 exit 0
42- elif [ -f "${{ github.workspace }}/package.json" ]; then
48+ elif [ -f "${{ github.workspace }}/package-lock .json" ]; then
4349 echo "manager=npm" >> $GITHUB_OUTPUT
4450 echo "command=ci" >> $GITHUB_OUTPUT
4551 echo "runner=npx --no-install" >> $GITHUB_OUTPUT
4652 exit 0
53+ elif [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then
54+ echo "manager=pnpm" >> $GITHUB_OUTPUT
55+ echo "command=install --frozen-lockfile" >> $GITHUB_OUTPUT
56+ echo "runner=pnpm" >> $GITHUB_OUTPUT
57+ exit 0
4758 else
4859 echo "Unable to determine package manager"
4960 exit 1
5061 fi
51- - name : Setup Node
62+
63+ - name : Setup Node Javi
5264 uses : actions/setup-node@v4
5365 with :
54- node-version : " 20 "
66+ node-version : " lts/* "
5567 cache : ${{ steps.detect-package-manager.outputs.manager }}
68+
5669 - name : Setup Pages
5770 uses : actions/configure-pages@v5
5871 with :
@@ -71,10 +84,13 @@ jobs:
7184 # If source files changed but packages didn't, rebuild from a prior cache.
7285 restore-keys : |
7386 ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
87+
7488 - name : Install dependencies
7589 run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
90+
7691 - name : Build with Next.js
7792 run : ${{ steps.detect-package-manager.outputs.runner }} next build
93+
7894 - name : Upload artifact
7995 uses : actions/upload-pages-artifact@v3
8096 with :
90106 steps :
91107 - name : Deploy to GitHub Pages
92108 id : deployment
93- uses : actions/deploy-pages@v4
109+ uses : actions/deploy-pages@v4
0 commit comments