Skip to content

Commit 87d5006

Browse files
author
igyfhc
committed
拆分
1 parent 5b07d80 commit 87d5006

File tree

4 files changed

+31
-19
lines changed

4 files changed

+31
-19
lines changed

.deploy/games/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<title>games</title>
88
</head>
99
<body>
10-
game index
10+
game index 游戏
1111
</body>
1212
</html>

.github/workflows/before.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: before
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
init:
8+
name: Init
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: latest
19+
- name: Setup Pages
20+
uses: actions/configure-pages@v4

.github/workflows/build-blog.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,10 @@ defaults:
99

1010
jobs:
1111
build:
12-
name: Build
12+
name: Build Blog
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 0
19-
- name: Setup Node
20-
uses: actions/setup-node@v4
21-
with:
22-
node-version: latest
23-
- name: Setup Pages
24-
uses: actions/configure-pages@v4
2515
- name: Install dependencies
2616
run: npm ci # ci: Clean install a project
2717
- name: Build with VitePress
2818
run: npm run docs:build
29-
- name: Upload artifact
30-
uses: actions/upload-pages-artifact@v3
31-
with:
32-
path: .deploy

.github/workflows/deploy.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,21 @@ permissions:
1414
id-token: write
1515

1616
jobs:
17-
call-build-blog:
18-
uses: ./.github/workflows/build-blog.yml
17+
call-workflow:
18+
uses:
19+
- ./.github/workflows/before.yml
20+
- ./.github/workflows/build-blog.yml
1921
deploy:
20-
needs: call-build-blog
22+
needs: call-workflow
2123
environment:
2224
name: github-pages
2325
runs-on: ubuntu-latest
2426
name: Deploy
2527
steps:
28+
- name: Upload artifact
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: .deploy
2632
- name: Deploy to GitHub Pages
2733
id: deployment
2834
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)