Skip to content

Commit d85cc48

Browse files
frant1cfrant1c
authored andcommitted
deploy
1 parent 8a889bf commit d85cc48

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: [main]
66

7+
permissions:
8+
contents: write # 添加写入权限
9+
710
jobs:
811
build-and-deploy:
912
runs-on: ubuntu-latest
@@ -25,14 +28,13 @@ jobs:
2528

2629
- name: Setup GitHub Pages
2730
run: |
28-
# 创建必要的文件
2931
touch dist/.nojekyll
30-
# 如果使用客户端路由,复制 index.html 为 404.html
3132
cp dist/index.html dist/404.html 2>/dev/null || true
3233
3334
- name: Deploy to GitHub Pages
3435
uses: peaceiris/actions-gh-pages@v3
3536
with:
3637
github_token: ${{ secrets.GITHUB_TOKEN }}
3738
publish_dir: ./dist
38-
force_orphan: true # 保持 gh-pages 分支清洁
39+
user_name: "github-actions[bot]"
40+
user_email: "github-actions[bot]@users.noreply.github.com"

0 commit comments

Comments
 (0)