Skip to content

Commit 59c0760

Browse files
update web 2
1 parent 0ef95e8 commit 59c0760

4 files changed

Lines changed: 33 additions & 12 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
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: Deploy to GitHub Pages
22+
uses: peaceiris/actions-gh-pages@v3
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
publish_dir: ./frontend/dist

.github/workflows/static.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
- name: Upload artifact
3737
uses: actions/upload-pages-artifact@v3
3838
with:
39-
# Upload entire repository
40-
path: '.'
39+
# Upload built frontend (commit dist to repo)
40+
path: 'frontend/dist'
4141
- name: Deploy to GitHub Pages
4242
id: deployment
4343
uses: actions/deploy-pages@v4

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"name": "career-guidance-frontend",
33
"version": "1.0.0",
44
"private": true,
5+
"homepage": "https://thisIsAnVariableOfACoder.github.io/myAIchatbotProject",
6+
"type": "module",
57
"scripts": {
68
"dev": "vite",
79
"build": "vite build",

frontend/vite.config.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
import { defineConfig } from 'vite';
2-
import react from '@vitejs/plugin-react';
1+
import { defineConfig } from 'vite'
2+
import react from '@vitejs/plugin-react'
33

44
export default defineConfig({
5-
base: './',
65
plugins: [react()],
7-
server: {
8-
port: 5173,
9-
proxy: {
10-
'/api': 'http://localhost:3001'
11-
}
12-
}
13-
});
6+
base: '/myAIchatbotProject/',
7+
})

0 commit comments

Comments
 (0)