-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 1.07 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy to GitHub Pages
on:
push:
branches:
- main # 使用你的主分支名
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4 # 使用最新版本的 checkout
- name: Set up Node.js
uses: actions/setup-node@v4 # 使用最新版本的 setup-node
with:
node-version: 'lts/*' # 使用 Node.js 的最新 LTS 版本
- name: List directory for debugging
run: ls -a
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies with pnpm
run: cd pjallcate_frontend && pnpm install
- name: Build project with pnpm
run: cd pjallcate_frontend && pnpm run build-only
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4 # 使用最新版本的 actions-gh-pages
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./pjallcate_frontend/dist # 确保指向正确的构建输出目录
publish_branch: gh-pages