Skip to content

细节修改

细节修改 #13

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main # 当推送到 main 分支时触发构建
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm run build # 确保在 package.json 中包含 build 脚本
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist # 构建输出的静态文件目录