mirror of
https://github.com/talktao/Vue3-Vite-Vant-TS-H5.git
synced 2025-04-06 03:57:55 +08:00
build
This commit is contained in:
parent
17d910e156
commit
bb789db4c2
27
.github/workflows/ci.yml
vendored
Normal file
27
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Build and Deploy
|
||||||
|
on: # 监听 master 分支上的 push 事件
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest # 构建环境使用 ubuntu
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2.3.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Install and Build # 下载依赖 打包项目
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Deploy # 将打包内容发布到 github page
|
||||||
|
uses: JamesIves/github-pages-deploy-action@3.5.9 # 使用别人写好的 actions
|
||||||
|
with: # 自定义环境变量
|
||||||
|
ACCESS_TOKEN: ${{ secrets.VUE_ADMIN_TEMPLATE }} # VUE_ADMIN_TEMPLATE 是我的 secret 名称,需要替换成你的
|
||||||
|
BRANCH: master
|
||||||
|
FOLDER: dist
|
||||||
|
REPOSITORY_NAME: talktao/talktao.github.io # 这是我的 github page 仓库
|
||||||
|
TARGET_FOLDER: vue3-vite-vant-ts-h5 # 打包的文件将放到静态服务器 github-actions-demo 目录下
|
@ -2,7 +2,6 @@
|
|||||||
"name": "vue-vant-ts",
|
"name": "vue-vant-ts",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"homepage": "https://talktao.github.io",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
@ -10,7 +10,7 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
return {
|
return {
|
||||||
|
|
||||||
// 静态资源基础路径 base: './' || '',
|
// 静态资源基础路径 base: './' || '',
|
||||||
base: '/Vue3-Vite-Vant-TS-H5/',
|
base: '',
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user