Skip to content

Commit 8b9e032

Browse files
committed
Add GitHub Pages deployment configuration
1 parent 6fb7d8a commit 8b9e032

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '18'
20+
21+
- name: Install Dependencies
22+
run: npm install
23+
24+
- name: Build
25+
run: npm run build
26+
27+
- name: Deploy to GitHub Pages
28+
uses: JamesIves/github-pages-deploy-action@v4
29+
with:
30+
folder: dist
31+
branch: gh-pages

vite.config.js

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

4-
// https://vite.dev/config/
4+
// https://vitejs.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7+
base: '/zk-monitor/',
78
})

0 commit comments

Comments
 (0)