Skip to content

Commit 07b1fd0

Browse files
author
Shanshui2024
committed
Retry Again
Signed-off-by: Shanshui2024 <[email protected]>
1 parent 6fc31c4 commit 07b1fd0

File tree

2 files changed

+11
-65
lines changed

2 files changed

+11
-65
lines changed

.github/workflows/dependabot-dedupe.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: Deploy tldraw to GitHub Pages
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [ main ] # 触发分支,按需修改
66

77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
permissions:
11-
contents: write
11+
contents: write # 允许写入 gh-pages 分支
1212

1313
steps:
1414
# 1. 检出代码
@@ -17,35 +17,20 @@ jobs:
1717

1818
# 2. 设置 Node.js 环境
1919
- name: Setup Node.js
20-
uses: actions/setup-node@v4 # 升级到 v4
20+
uses: actions/setup-node@v4
2121
with:
22-
node-version: 20
23-
cache: 'yarn'
22+
node-version: '20' # tldraw 要求 Node 16+
2423

25-
# 3. 启用 Corepack 并安装正确 Yarn 版本
26-
- name: Setup Yarn via Corepack
24+
# 3. 安装依赖并构建
25+
- name: Install and Build
2726
run: |
28-
# 启用 Corepack 并安装 package.json 指定的 Yarn 版本
29-
corepack enable
30-
corepack prepare yarn@stable --activate
31-
32-
# 验证 Yarn 版本
33-
yarn --version
34-
shell: bash
27+
npm ci
28+
npm run build
3529
36-
# 4. 安装依赖
37-
- name: Install dependencies
38-
run: yarn install --immutable
39-
shell: bash
40-
41-
# 5. 构建项目
42-
- name: Build project
43-
run: yarn build
44-
shell: bash
45-
46-
# 6. 部署到 GitHub Pages
30+
# 4. 部署到 GitHub Pages
4731
- name: Deploy to gh-pages
4832
uses: peaceiris/actions-gh-pages@v4
4933
with:
5034
github_token: ${{ secrets.GITHUB_TOKEN }}
51-
publish_dir: dist
35+
publish_dir: dist # tldraw 默认构建目录
36+
keep_files: false # 清除旧文件

0 commit comments

Comments
 (0)