Skip to content

submit

submit #5

Workflow file for this run

name: Build Project
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1. 拉取代码
- name: Checkout Code
uses: actions/checkout@v3
# 2. 设置 Node.js 环境(使用最新版)
- name: Setup Node.js version
uses: actions/setup-node@v3
with:
node-version: '15.14.0'
cache: 'yarn'
# 3. 安装依赖
- name: Install Dependencies
run: yarn install
# 4. 构建项目
- name: Build Project
run: yarn build
# 5. 构建结果 推送到 dist 分支
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
branch: dist
folder: ./docs/.vuepress/dist