Skip to content

Commit b611464

Browse files
committed
feat: add GitHub Pages deployment for web-preview
- Add GitHub Pages workflow to deploy web-preview React app - Configure Vite for GitHub Pages with proper base path - Update release workflow to validate web-preview builds - Add demo link to README with live GitHub Pages URL - Configure GitHub Pages settings (.nojekyll, _config.yml) - Update CLAUDE.md with web-preview development commands This separates concerns: - NPM module: Core functionality published to npm registry - GitHub Pages: Interactive demo hosted at github.io
1 parent 5d5798d commit b611464

File tree

7 files changed

+79
-0
lines changed

7 files changed

+79
-0
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'web-preview/**'
8+
- '.github/workflows/deploy-pages.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build-and-deploy:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
cache: 'npm'
33+
cache-dependency-path: 'web-preview/package-lock.json'
34+
35+
- name: Install dependencies
36+
working-directory: ./web-preview
37+
run: npm ci
38+
39+
- name: Build web preview
40+
working-directory: ./web-preview
41+
run: npm run build
42+
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v4
45+
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: './web-preview/dist'
50+
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,20 @@ jobs:
3939
- name: Install dependencies
4040
run: npm ci
4141

42+
- name: Install web-preview dependencies (for build check)
43+
working-directory: ./web-preview
44+
run: npm ci
45+
4246
- name: Run tests
4347
run: npm test
4448

4549
- name: Build project
4650
run: npm run build
4751

52+
- name: Build web-preview (validation)
53+
working-directory: ./web-preview
54+
run: npm run build
55+
4856
- name: Extract version from tag
4957
id: version
5058
run: |

CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1010
- `npm test` - Run all tests using Node.js built-in test runner
1111
- `npm run prepublishOnly` - Build before publishing (runs automatically)
1212

13+
### Web Preview Development
14+
15+
- `cd web-preview && npm run dev` - Start development server for React demo
16+
- `cd web-preview && npm run build` - Build demo for production
17+
- `cd web-preview && npm run preview` - Preview built demo locally
18+
1319
### Release Process
1420

1521
- `npm run release:patch` - Bump patch version and publish

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ npm install @253eosam/commit-from-branch --save-dev
2222

2323
> **Note**: This package requires Husky v9 as a peer dependency. npm will automatically warn you if it's not installed.
2424
25+
## Demo
26+
27+
🌐 **[Live Demo](https://253eosam.github.io/commit-from-branch/)** - Try the interactive demo to see how commit message templating works!
28+
2529
## Quick Start
2630

2731
1. **Install Husky v9** (if not already installed):

web-preview/public/.nojekyll

Whitespace-only changes.

web-preview/public/_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# GitHub Pages에서 모든 파일을 처리하도록 설정
2+
include:
3+
- "_*"

web-preview/vite.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ import react from '@vitejs/plugin-react'
44
// https://vite.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7+
base: '/commit-from-branch/', // GitHub Pages 저장소 경로
8+
build: {
9+
outDir: 'dist',
10+
sourcemap: true,
11+
},
712
})

0 commit comments

Comments
 (0)