We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a889bf commit d85cc48Copy full SHA for d85cc48
.github/workflows/deploy.yml
@@ -4,6 +4,9 @@ on:
4
push:
5
branches: [main]
6
7
+permissions:
8
+ contents: write # 添加写入权限
9
+
10
jobs:
11
build-and-deploy:
12
runs-on: ubuntu-latest
@@ -25,14 +28,13 @@ jobs:
25
28
26
29
- name: Setup GitHub Pages
27
30
run: |
- # 创建必要的文件
31
touch dist/.nojekyll
- # 如果使用客户端路由,复制 index.html 为 404.html
32
cp dist/index.html dist/404.html 2>/dev/null || true
33
34
- name: Deploy to GitHub Pages
35
uses: peaceiris/actions-gh-pages@v3
36
with:
37
github_token: ${{ secrets.GITHUB_TOKEN }}
38
publish_dir: ./dist
- force_orphan: true # 保持 gh-pages 分支清洁
39
+ user_name: "github-actions[bot]"
40
+ user_email: "github-actions[bot]@users.noreply.github.com"
0 commit comments