Skip to content

flow: update node version #2

flow: update node version

flow: update node version #2

name: Deploy to GitHub Pages
on:
push:
branches:
- main # 触发workflow的分支
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # 根据你的项目配置选择合适的Node.js版本
- name: Install Dependencies
run: npm install # 或者使用yarn
- name: Build Project
run: npm run build # 或者使用你的构建命令
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build # 你的构建输出目录