-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.14 KB
/
Copy pathpublish.yml
File metadata and controls
53 lines (41 loc) · 1.14 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build & Publish UserScripts
on:
push:
branches: [main]
paths:
- 'src/**'
- 'scripts/**'
- 'packages/**'
- 'package.json'
- 'bun.lock'
- 'tsconfig.json'
- '.github/workflows/**'
# 允许手动触发
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: cd packages/components && bun install
- run: bun run typecheck
- name: Build component library
run: cd packages/components && bun run build
- run: bun run build
# 生成同步清单(供调试和 Webhook 使用)
- name: Generate sync manifest
run: bun run manifest
# 部署 dist/ 到 gh-pages 分支
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
# 不保留历史,每次全量替换
keep_files: false