Skip to content

Commit 37eaa7f

Browse files
committed
cd
1 parent 3402a41 commit 37eaa7f

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

.github/workflows/deploy.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,45 @@ jobs:
3131

3232
steps:
3333
- name: Checkout
34-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3535

3636
- name: Install Node.js
37-
uses: actions/setup-node@v3
37+
uses: actions/setup-node@v4
3838
with:
3939
node-version: 20
4040

41-
- uses: pnpm/action-setup@v2
41+
- uses: pnpm/action-setup@v4
4242
name: Install pnpm
4343
id: pnpm-install
4444
with:
4545
version: 9
4646
run_install: false
47-
48-
- name: Get pnpm store directory
49-
id: pnpm-cache
50-
shell: bash
51-
run: |
52-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
53-
- uses: actions/cache@v3
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v5
49+
with:
50+
# Automatically inject basePath in your Next.js configuration file and disable
51+
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
52+
#
53+
# You may remove this line if you want to manage the configuration yourself.
54+
static_site_generator: next
55+
- uses: actions/cache@v4
5456
name: Setup pnpm cache
5557
with:
56-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
57-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
58+
path: |
59+
.next/cache
60+
# Generate a new cache whenever packages or source files change.
61+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
62+
# If source files changed but packages didn't, rebuild from a prior cache.
5863
restore-keys: |
59-
${{ runner.os }}-pnpm-store-
64+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}-
65+
# with:
66+
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
67+
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
68+
# restore-keys: |
69+
# ${{ runner.os }}-pnpm-store-
6070
- name: Install dependencies
6171
run: pnpm install
6272

63-
- name: Setup Pages
64-
uses: actions/configure-pages@v3
65-
with:
66-
static_site_generator: next
6773
- name: Build with Next.js
6874
run: pnpm next build
6975
- name: Static HTML export with Next.js
@@ -83,4 +89,4 @@ jobs:
8389
steps:
8490
- name: Deploy to GitHub Pages
8591
id: deployment
86-
uses: actions/deploy-pages@v3
92+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)