Skip to content

feat: 1.update dir #48

feat: 1.update dir

feat: 1.update dir #48

Workflow file for this run

# 当前执行文件名称
name: Deploy docs action
# 触发时机
on:
push:
branches:
- main
paths:
- 'docs/**'
jobs:
build-and-deploy:
# 运行在ubuntu-latest环境的虚拟机中
runs-on: ubuntu-latest
steps:
# 获取仓库源码
- name: Checkout 🛎️
uses: actions/checkout@v3
# Setup node
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
# Install pnpm
- name: Install pnpm
run: corepack enable
# 构建和部署
- name: Install deps
run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
- name: Build w-design-vue
run: pnpm build
- name: Build docs
run: pnpm docs:build
# 发布
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
# 环境变量
with:
# 发布到指定分支
branch: gh-pages
# 构建成果所在目录,默认位置都是在根目录
folder: docs/.vitepress/dist
clean: true