Skip to content

Commit 3c9c1ff

Browse files
committed
feat: github-page 배포 설정 추가
1 parent 9615013 commit 3c9c1ff

File tree

5 files changed

+249
-15
lines changed

5 files changed

+249
-15
lines changed

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to GitHub 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+
jobs:
14+
deploy:
15+
environment:
16+
name: github-pages
17+
url: ${{ steps.deployment.outputs.page_url }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Set up Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: 'npm'
27+
- name: Install dependencies
28+
run: npm install -g pnpm && pnpm install
29+
- name: Build
30+
run: pnpm build
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v4
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: './dist'
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"lint": "eslint .",
1010
"preview": "vite preview",
1111
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
12-
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\""
12+
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
13+
"predeploy": "pnpm build",
14+
"deploy": "gh-pages -d dist"
1315
},
1416
"dependencies": {
1517
"@emotion/react": "^11.14.0",
@@ -35,6 +37,7 @@
3537
"eslint-plugin-prettier": "^5.2.6",
3638
"eslint-plugin-react-hooks": "^5.1.0",
3739
"eslint-plugin-react-refresh": "^0.4.19",
40+
"gh-pages": "^6.3.0",
3841
"globals": "^15.15.0",
3942
"prettier": "^3.5.3",
4043
"typescript": "~5.7.2",

0 commit comments

Comments
 (0)