build: github workflow
This commit is contained in:
parent
7adec9e644
commit
140d80e17f
@ -1,10 +1,10 @@
|
||||
name: Deploy Pages
|
||||
name: Build and Deploy VitePress Site with Pnpm
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ['main']
|
||||
|
||||
branches:
|
||||
- main # 你想要触发部署的分支名称
|
||||
# 你可以根据需要添加其他触发条件
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
@ -17,7 +17,8 @@ permissions:
|
||||
jobs:
|
||||
# Build job
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-latest # 运行环境
|
||||
|
||||
steps:
|
||||
# 设置服务器时区为东八区
|
||||
- name: Set time zone
|
||||
@ -32,12 +33,14 @@ jobs:
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm i --no-frozen-lockfile
|
||||
- name: Build
|
||||
run: pnpm build:h5
|
||||
|
||||
- name: Build VitePress site with Pnpm
|
||||
run: pnpm run docs:build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./dist/build/h5
|
||||
path: ./docs/.vitepress/dist/
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -46,6 +46,7 @@
|
||||
"tabbar",
|
||||
"unibest",
|
||||
"uvui",
|
||||
"vitepress",
|
||||
"WechatMiniprogram"
|
||||
],
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||
|
Loading…
x
Reference in New Issue
Block a user