Skip to content

Commit 54b4758

Browse files
committed
ci: GitHub Pages 배포 설정 추가
1 parent 26e750c commit 54b4758

2 files changed

Lines changed: 39 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
cache: npm
25+
- run: npm ci
26+
- run: npm run build
27+
- uses: actions/upload-pages-artifact@v3
28+
with:
29+
path: dist
30+
31+
deploy:
32+
needs: build
33+
runs-on: ubuntu-latest
34+
steps:
35+
- id: deployment
36+
uses: actions/deploy-pages@v4

vite.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
22
import react from '@vitejs/plugin-react'
33

44
// https://vitejs.dev/config/
5-
export default defineConfig({
5+
export default defineConfig(({ command }) => ({
66
plugins: [react()],
7-
})
7+
base: command === 'build' ? '/Hamiltonian-Simulation-JJ04s/' : '/',
8+
}))

0 commit comments

Comments
 (0)