Skip to content

Commit c99dd56

Browse files
jayychoiclaude
andcommitted
GitHub Pages 배포 워크플로우 개선
- 패키지 매니저를 npm에서 pnpm으로 변경 - content 레포 별도 checkout step 추가 - packageManager 필드 추가 (pnpm@10.28.2) - 캐시 키를 pnpm-lock.yaml 기반으로 수정 - pnpm build로 Velite 포함 빌드 - cancel-in-progress 활성화 - 불필요한 템플릿 보일러플레이트 제거 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0baa31f commit c99dd56

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Deploy Next.js site to Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Checkout content
25+
uses: actions/checkout@v4
26+
with:
27+
repository: jayychoi/blog-content
28+
path: content
29+
30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: "24"
37+
cache: pnpm
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v5
41+
with:
42+
static_site_generator: next
43+
44+
- name: Restore Next.js cache
45+
uses: actions/cache@v4
46+
with:
47+
path: .next/cache
48+
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
49+
restore-keys: |
50+
${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-
51+
52+
- name: Install dependencies
53+
run: pnpm install --frozen-lockfile
54+
55+
- name: Build
56+
run: pnpm build
57+
58+
- name: Upload artifact
59+
uses: actions/upload-pages-artifact@v3
60+
with:
61+
path: ./out
62+
63+
deploy:
64+
environment:
65+
name: github-pages
66+
url: ${{ steps.deployment.outputs.page_url }}
67+
runs-on: ubuntu-latest
68+
needs: build
69+
steps:
70+
- name: Deploy to GitHub Pages
71+
id: deployment
72+
uses: actions/deploy-pages@v4

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "jayychoi.github.io",
33
"version": "0.1.0",
44
"private": true,
5+
"packageManager": "pnpm@10.28.2",
56
"scripts": {
67
"dev": "next dev",
78
"build": "next build",

0 commit comments

Comments
 (0)