Skip to content

feat: ✨ 1. 修改构建时候的报错 #136

feat: ✨ 1. 修改构建时候的报错

feat: ✨ 1. 修改构建时候的报错 #136

Workflow file for this run

# 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程
#
name: Deploy VitePress site to Pages
on:
# 在针对 `main` 分支的推送上运行。如果你
# 使用 `master` 分支作为默认分支,请将其更改为 `master`
push:
branches: main
jobs:
# 构建工作
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install and Build with VitePress # 下载依赖 打包项目
run: |
npm install
npm run docs:build
- name: Deploy to GitHub Pages
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add .
git commit -m "Auto-deploy from GitHub Actions"
git push origin main:main --force