Skip to content

Commit 3e0e80e

Browse files
committed
feat: add deploy config
1 parent d6e64fd commit 3e0e80e

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

.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
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 18
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build project
25+
run: npm run build
26+
27+
- name: Deploy to GitHub Pages
28+
uses: peaceiris/actions-gh-pages@v4
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: ./dist

vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ import react from '@vitejs/plugin-react-swc';
33

44
export default defineConfig({
55
plugins: [react()],
6+
base: '/github_r_pr/',
67
});

0 commit comments

Comments
 (0)