Skip to content

Commit ee6b986

Browse files
committed
fix(nextjs.yml): updated pnpm
1 parent 0a2a87e commit ee6b986

File tree

2 files changed

+10
-101
lines changed

2 files changed

+10
-101
lines changed

.github/workflows/nextjs.yml

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,48 @@
1-
# Sample workflow for building and deploying a Next.js site to GitHub Pages
2-
#
3-
# To get started with Next.js see: https://nextjs.org/docs/getting-started
4-
#
51
name: Deploy Next.js site to Pages
6-
72
on:
8-
# Runs on pushes targeting the default branch
93
push:
104
branches: ["main"]
11-
12-
# Allows you to run this workflow manually from the Actions tab
135
workflow_dispatch:
14-
15-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
166
permissions:
177
contents: read
188
pages: write
199
id-token: write
20-
21-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2310
concurrency:
2411
group: "pages"
2512
cancel-in-progress: false
26-
2713
jobs:
28-
# Build job
2914
build:
3015
runs-on: ubuntu-latest
3116
steps:
3217
- name: Checkout
3318
uses: actions/checkout@v4
3419
- name: Detect package manager
3520
id: detect-package-manager
36-
run: |
37-
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
38-
echo "manager=yarn" >> $GITHUB_OUTPUT
39-
echo "command=install" >> $GITHUB_OUTPUT
40-
echo "runner=yarn" >> $GITHUB_OUTPUT
41-
exit 0
42-
elif [ -f "${{ github.workspace }}/package.json" ]; then
43-
echo "manager=npm" >> $GITHUB_OUTPUT
44-
echo "command=ci" >> $GITHUB_OUTPUT
45-
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
46-
exit 0
47-
else
48-
echo "Unable to determine package manager"
49-
exit 1
50-
fi
21+
run: "if [ -f \"${{ github.workspace }}/pnpm-lock.yaml\" ]; then\n echo \"manager=pnpm\" >> $GITHUB_OUTPUT\n echo \"command=install --frozen-lockfile\" >> $GITHUB_OUTPUT\n echo \"runner=pnpm exec\" >> $GITHUB_OUTPUT\n exit 0\nelif [ -f \"${{ github.workspace }}/yarn.lock\" ]; then\n echo \"manager=yarn\" >> $GITHUB_OUTPUT\n echo \"command=install\" >> $GITHUB_OUTPUT\n echo \"runner=yarn\" >> $GITHUB_OUTPUT\n exit 0\nelif [ -f \"${{ github.workspace }}/package.json\" ]; then\n echo \"manager=npm\" >> $GITHUB_OUTPUT\n echo \"command=ci\" >> $GITHUB_OUTPUT\n echo \"runner=npx --no-install\" >> $GITHUB_OUTPUT\n exit 0\nelse\n echo \"Unable to determine package manager\"\n exit 1\nfi\n \n"
5122
- name: Setup Node
5223
uses: actions/setup-node@v4
5324
with:
5425
node-version: "20"
5526
cache: ${{ steps.detect-package-manager.outputs.manager }}
27+
- name: Setup pnpm
28+
if: steps.detect-package-manager.outputs.manager == 'pnpm'
29+
uses: pnpm/action-setup@v2
30+
with:
31+
version: 8
5632
- name: Setup Pages
5733
uses: actions/configure-pages@v5
5834
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.
6335
static_site_generator: next
6436
- name: Restore cache
6537
uses: actions/cache@v4
6638
with:
6739
path: |
6840
.next/cache
69-
# Generate a new cache whenever packages or source files change.
70-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
71-
# If source files changed but packages didn't, rebuild from a prior cache.
41+
# pnpm specific cache location
42+
~/.pnpm-store
43+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml', '**/yarn.lock', '**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
7244
restore-keys: |
73-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
45+
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml', '**/yarn.lock', '**/package-lock.json') }}-
7446
- name: Install dependencies
7547
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
7648
- name: Build with Next.js
@@ -79,8 +51,6 @@ jobs:
7951
uses: actions/upload-pages-artifact@v3
8052
with:
8153
path: ./out
82-
83-
# Deployment job
8454
deploy:
8555
environment:
8656
name: github-pages

src/components/ui/tooltip.tsx

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)