build: add workflow & VITE_APP_PUBLIC_BASE config
This commit is contained in:
parent
fe34178250
commit
d8c910a467
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: Bug report(报告问题)
|
||||||
|
about: Create a report to help us improve
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
注意:为更好的解决你的问题,请参考模板提供完整信息,准确描述问题,信息不全的 issue 将被关闭。
|
||||||
|
|
||||||
|
Note: In order to better solve your problem, please refer to the template to provide complete information, accurately describe the problem, and the incomplete information issue will be closed.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Bug report(问题描述)
|
||||||
|
|
||||||
|
please write your issue description here
|
||||||
|
|
||||||
|
## Steps to reproduce(问题复现步骤)
|
||||||
|
|
||||||
|
<!--
|
||||||
|
1. [xxx]
|
||||||
|
2. [xxx]
|
||||||
|
3. [xxxx]
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Screenshot or Gif(截图或动态图)
|
||||||
|
|
||||||
|
## minimal reproduction(最小可还原代码)
|
||||||
|
|
||||||
|
## System Info
|
||||||
|
|
||||||
|
`npx envinfo --system --npmPackages vue --binaries --browsers`
|
||||||
|
|
||||||
|
执行上面命令,将结果贴下面
|
6
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
6
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request(新功能建议)
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
---
|
||||||
|
|
||||||
|
# Feature request(新功能建议)
|
52
.github/workflows/deploy-h5.yml
vendored
Normal file
52
.github/workflows/deploy-h5.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: Deploy Pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Runs on pushes targeting the default branch
|
||||||
|
push:
|
||||||
|
branches: ['main']
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Build job
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# 设置服务器时区为东八区
|
||||||
|
- name: Set time zone
|
||||||
|
run: sudo timedatectl set-timezone 'Asia/Shanghai'
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: 8
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
cache: 'pnpm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm i --no-frozen-lockfile
|
||||||
|
- name: Build
|
||||||
|
run: pnpm build:h5
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: ./dist/build/h5
|
||||||
|
|
||||||
|
# Deployment job
|
||||||
|
deploy:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
2
env/.env
vendored
2
env/.env
vendored
@ -2,7 +2,7 @@ VITE_APP_TITLE = 'unibest'
|
|||||||
VITE_APP_PORT = 9000
|
VITE_APP_PORT = 9000
|
||||||
|
|
||||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||||
VITE_APP_PUBLIC_BASE=/
|
VITE_APP_PUBLIC_BASE=/unibest/
|
||||||
|
|
||||||
VITE_UNI_APPID = 'H57F2ACE4'
|
VITE_UNI_APPID = 'H57F2ACE4'
|
||||||
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user