Skip to content

chore: update deploy.yml #6

chore: update deploy.yml

chore: update deploy.yml #6

name: Deploy to GitHub Pages
on:
push:
branches:
- main # 你可以根据需要更改为你想要部署的分支
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@4
- name: Set up Node.js
uses: actions/setup-node@4
with:
node-version: 22.9.0
- name: Install pnpm
run: npm i pnpm -g
- name: Install dependencies
run: pnpm i
- name: Build
run: pnpm build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }},
BRANCH: gh-pages,
FOLDER: dist