refactor: add gp-pages support

This commit is contained in:
zyronon 2024-04-09 18:52:31 +08:00
parent b350263a80
commit f8a1bdba0c
4 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,7 @@ jobs:
run: pnpm install run: pnpm install
- name: Build - name: Build
run: pnpm run build run: pnpm run build-gp-pages
- name: Setup Pages - name: Setup Pages
uses: actions/configure-pages@v3 uses: actions/configure-pages@v3
- name: Upload artifact - name: Upload artifact

1
env/.env.gp_pages vendored Normal file
View File

@ -0,0 +1 @@
VITE_ENV = "GP_PAGES"

View File

@ -8,6 +8,7 @@
"serve": "vite --host", "serve": "vite --host",
"build": "vite build --mode prod", "build": "vite build --mode prod",
"build-uni-app": "vite build --mode uni", "build-uni-app": "vite build --mode uni",
"build-gp-pages": "vite build --mode gp_pages",
"build-only": "vite build", "build-only": "vite build",
"build-check": "run-p type-check \"build-only {@}\" --", "build-check": "run-p type-check \"build-only {@}\" --",
"type-check": "vue-tsc --build --force", "type-check": "vue-tsc --build --force",

View File

@ -6,6 +6,7 @@ export default {
const BASE_URL_MAP = { const BASE_URL_MAP = {
DEV: '', DEV: '',
PROD: '', PROD: '',
GP_PAGES: '/dist',
UNI: 'https://dy.ttentau.top' UNI: 'https://dy.ttentau.top'
} }