Skip to content

Commit

Permalink
Update nextjs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
YuniqueUnic authored Aug 19, 2024
1 parent 8926d42 commit 92abb4a
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then
echo "manager=pnpm" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=pnpm" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'pnpm' # 注意这里的缓存键已更改为 pnpm
cache: 'pnpm'
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 8
run_install: false
- name: Setup Pages
uses: actions/configure-pages@v5
with:
Expand All @@ -50,7 +43,7 @@ jobs:
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- name: Install dependencies
run: pnpm install # 注意这里使用了 pnpm install
run: pnpm install
- name: Build with Next.js
run: pnpm run build
- name: Upload artifact
Expand Down

0 comments on commit 92abb4a

Please sign in to comment.