Skip to content

chore: fix deploy config error #5

chore: fix deploy config error

chore: fix deploy config error #5

Workflow file for this run

name: Deploy Next.js to GitHub Pages
on:
push:
branches:
- main # Trigger the workflow every time you push to the `main` branch
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x' # 根据需要设置 Node.js 版本
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Build and export
run: pnpm run build
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out