Skip to content

Commit 5a436e3

Browse files
committed
调整工作流
1 parent 914e4ab commit 5a436e3

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/gh-pages.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ name: Publish GitHub Pages
33
# Controls when the action will run.
44
on:
55
workflow_dispatch:
6+
secrets:
7+
TOKEN:
8+
required: true
69
workflow_call:
10+
secrets:
11+
TOKEN:
12+
required: true
713

814
permissions:
915
contents: read
@@ -51,6 +57,11 @@ jobs:
5157
# Upload dist repository
5258
path: './public'
5359

54-
- name: Deploy to GitHub Pages
55-
id: deployment
56-
uses: actions/deploy-pages@v4
60+
- name: Push
61+
uses: peaceiris/actions-gh-pages@v4
62+
with:
63+
github_token: ${{ secrets.TOKEN }}
64+
publish_branch: master
65+
force_orphan: true
66+
publish_dir: ./public
67+
cname: liudon.com

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
github_pages:
5252
name: Build and Publish Github Pages
5353
uses: ./.github/workflows/gh-pages.yml
54+
secrets:
55+
TOKEN: ${{ secrets.TOKEN }}
5456
needs:
5557
- start
5658

0 commit comments

Comments
 (0)