Skip to content

Commit

Permalink
Merge pull request #14 from fan9704/feature_firebase
Browse files Browse the repository at this point in the history
Update Project Base Route
  • Loading branch information
fan9704 authored Jul 18, 2023
2 parents 708b0de + 401dd82 commit 25b896d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,26 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 #Copy Code to Runner
- uses: actions/checkout@v3 #Copy Code to Runner
- name: Set timezone to Asia/Taipei
uses: szenius/[email protected]
with:
timezoneLinux: "Asia/Taipei"
timezoneMacos: "Asia/Taipei"

- name: Set up Node.js #Setup NodeJs Version
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16.15.1'
node-version: 18

- name: install dependencies
run: yarn install

- name: try to build the project
run: yarn build
run: yarn build:production

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_dir: ./dist_netlify
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"version": "0.0.0",
"private": true,
"main": "main.js",
"description": "Pet Monotoring System Frontend",
"description": "Pet Monitoring System Frontend",
"author": "FKT",
"scripts": {
"serve": "vite preview",
"build": "vite build",
"build:production": "vite build && mv dist dist_netlify/PetMonitoringSystem-Frontend",
"dev": "vite",
"preview": "vite preview"
},
Expand Down
8 changes: 7 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import HelloWorld from "../components/HelloWorld.vue";
import LoginView from "../views/Login.vue";
import PetListView from "../views/PetList.vue";
import MachineManagement from "../views/MachineManagement.vue";
import ChatLayout from "../components/chatComponents/chatLayout.vue";

const routes = [
{
Expand Down Expand Up @@ -37,11 +38,16 @@ const routes = [
path: "/graph",
name: "stompChat",
component: StompChat,
},
{
path:"/chat",
name:"chatLayout",
component:ChatLayout
}
];

const router = createRouter({
history: createWebHistory(),
history: createWebHistory('/PetMonitoringSystem-Frontend/'),
routes,
});

Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default ({ mode }) => {
// base: process.env.NODE_ENV === 'production'
// ? '/PetMonitoringSystem-Frontend/'
// : '/',
base: '/PetMonitoringSystem-Frontend/',
build:{
chunkSizeWarningLimit:1500,
},
Expand Down

0 comments on commit 25b896d

Please sign in to comment.