Skip to content

Commit 500d8a3

Browse files
committed
chore: Switch to pnpm and local gh-pages deployment
- Remove GitHub Actions workflow (deploy.yml) - Replace npm/yarn with pnpm - Add gh-pages package for local deployment - Update docusaurus config for new repo name (type-ruby.github.io) - Update README and CONTRIBUTING docs
1 parent 76ed7b7 commit 500d8a3

File tree

7 files changed

+11575
-18282
lines changed

7 files changed

+11575
-18282
lines changed

.github/workflows/deploy.yml

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

CONTRIBUTING.md

Lines changed: 19 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,20 @@ t-ruby.github.io/
6060
### 1. 의존성 설치
6161

6262
```bash
63-
npm install
63+
pnpm install
6464
```
6565

6666
### 2. 개발 서버 실행
6767

6868
```bash
6969
# 영문 버전으로 실행 (기본)
70-
npm start
70+
pnpm start
7171

7272
# 한국어 버전으로 실행
73-
npm start -- --locale ko
73+
pnpm start --locale ko
7474

7575
# 일본어 버전으로 실행
76-
npm start -- --locale ja
76+
pnpm start --locale ja
7777
```
7878

7979
브라우저에서 `http://localhost:3000`으로 접속하면 실시간으로 변경사항을 확인할 수 있습니다.
@@ -233,7 +233,7 @@ i18n/ja/docusaurus-plugin-content-docs/current/getting-started/installation.md
233233

234234
```bash
235235
# 한국어 버전으로 개발 서버 실행
236-
npm start -- --locale ko
236+
pnpm start --locale ko
237237
```
238238

239239
---
@@ -244,10 +244,10 @@ npm start -- --locale ko
244244

245245
```bash
246246
# 프로덕션 빌드
247-
npm run build
247+
pnpm build
248248

249249
# 빌드된 사이트 미리보기
250-
npm run serve
250+
pnpm serve
251251
```
252252

253253
### 2. 빌드 에러 확인
@@ -273,64 +273,14 @@ git commit -m "docs: Update utility types documentation"
273273

274274
### 4. GitHub Pages 배포
275275

276-
#### 방법 A: 수동 배포
277-
278276
```bash
279277
# gh-pages 브랜치로 빌드 및 배포
280-
npm run deploy
281-
```
282-
283-
#### 방법 B: GitHub Actions (권장)
284-
285-
`.github/workflows/deploy.yml` 파일을 생성:
286-
287-
```yaml
288-
name: Deploy to GitHub Pages
289-
290-
on:
291-
push:
292-
branches:
293-
- main
294-
295-
permissions:
296-
contents: read
297-
pages: write
298-
id-token: write
299-
300-
jobs:
301-
build:
302-
runs-on: ubuntu-latest
303-
steps:
304-
- uses: actions/checkout@v4
305-
- uses: actions/setup-node@v4
306-
with:
307-
node-version: 20
308-
cache: npm
309-
310-
- name: Install dependencies
311-
run: npm ci
312-
313-
- name: Build website
314-
run: npm run build
315-
316-
- name: Upload artifact
317-
uses: actions/upload-pages-artifact@v3
318-
with:
319-
path: build
320-
321-
deploy:
322-
environment:
323-
name: github-pages
324-
url: ${{ steps.deployment.outputs.page_url }}
325-
runs-on: ubuntu-latest
326-
needs: build
327-
steps:
328-
- name: Deploy to GitHub Pages
329-
id: deployment
330-
uses: actions/deploy-pages@v4
278+
pnpm deploy
331279
```
332280

333-
이후 main 브랜치에 push하면 자동으로 배포됩니다.
281+
이 명령어는:
282+
1. 사이트를 빌드합니다
283+
2. 빌드 결과물을 `gh-pages` 브랜치에 푸시합니다
334284

335285
---
336286

@@ -367,15 +317,15 @@ Broken link on page ...
367317

368318
```bash
369319
# 개발 서버 재시작
370-
npm start
320+
pnpm start
371321
```
372322

373323
### 빌드 캐시 문제
374324

375325
```bash
376326
# 캐시 삭제 후 재빌드
377327
rm -rf .docusaurus build node_modules/.cache
378-
npm run build
328+
pnpm build
379329
```
380330

381331
---
@@ -404,12 +354,12 @@ git commit -m "fix: Escape generic types in utility-types headings"
404354

405355
| 명령어 | 설명 |
406356
|--------|------|
407-
| `npm install` | 의존성 설치 |
408-
| `npm start` | 개발 서버 실행 |
409-
| `npm start -- --locale ko` | 한국어로 개발 서버 실행 |
410-
| `npm run build` | 프로덕션 빌드 |
411-
| `npm run serve` | 빌드된 사이트 미리보기 |
412-
| `npm run deploy` | GitHub Pages 배포 |
357+
| `pnpm install` | 의존성 설치 |
358+
| `pnpm start` | 개발 서버 실행 |
359+
| `pnpm start --locale ko` | 한국어로 개발 서버 실행 |
360+
| `pnpm build` | 프로덕션 빌드 |
361+
| `pnpm serve` | 빌드된 사이트 미리보기 |
362+
| `pnpm deploy` | GitHub Pages 배포 |
413363

414364
---
415365

README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,29 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
55
## Installation
66

77
```bash
8-
yarn
8+
pnpm install
99
```
1010

1111
## Local Development
1212

1313
```bash
14-
yarn start
14+
pnpm start
1515
```
1616

1717
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1818

1919
## Build
2020

2121
```bash
22-
yarn build
22+
pnpm build
2323
```
2424

2525
This command generates static content into the `build` directory and can be served using any static contents hosting service.
2626

2727
## Deployment
2828

29-
Using SSH:
30-
31-
```bash
32-
USE_SSH=true yarn deploy
33-
```
34-
35-
Not using SSH:
36-
3729
```bash
38-
GIT_USER=<Your GitHub username> yarn deploy
30+
pnpm deploy
3931
```
4032

41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
33+
This command builds the website and pushes to the `gh-pages` branch for GitHub Pages hosting.

docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ const config: Config = {
1111
v4: true,
1212
},
1313

14-
url: 'https://t-ruby.github.io',
14+
url: 'https://type-ruby.github.io',
1515
baseUrl: '/',
1616

1717
organizationName: 'type-ruby',
18-
projectName: 't-ruby.github.io',
18+
projectName: 'type-ruby.github.io',
1919

2020
onBrokenLinks: 'throw',
2121
onBrokenMarkdownLinks: 'warn',

0 commit comments

Comments
 (0)