Skip to content

chore: 调整 git action #6

chore: 调整 git action

chore: 调整 git action #6

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main # 监听的分支(改为你的主分支名称)
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# 检出代码
- name: Checkout repository
uses: actions/checkout@v3
# 设置 Node.js 环境
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # 指定 Node.js 版本
# 安装依赖并构建项目
- name: Install dependencies and build
run: |
npm install
npm run build:h5 # 运行你的构建命令
# 部署到 GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/build/h5 # 替换为你的构建输出目录