Skip to content

Commit 7a6239b

Browse files
committed
convert the compile job to step and add workflow_dispatch
1 parent b5de63a commit 7a6239b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/gh-pages-compile.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
workflow_call:
8+
workflow_dispatch:
89

910
jobs:
1011
compie:
@@ -21,3 +22,4 @@ jobs:
2122

2223
- name: Build
2324
run: hugo --minify
25+

.github/workflows/gh-pages-deploy.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ name: gh pages deploy
22

33
on:
44
push:
5-
branches:
6-
- deploy
5+
branches: [ deploy ]
6+
workflow_dispatch:
77

88
jobs:
9-
compile:
10-
uses: ./.github/workflows/gh-pages-compile.yml
11-
129
deploy:
1310
runs-on: ubuntu-20.04
1411
steps:
12+
- name: Compile Step
13+
uses: ./.github/workflows/gh-pages-compile.yml
14+
1515
- name: Deploy Step
1616
uses: peaceiris/actions-gh-pages@v3
1717
if: github.ref == 'refs/heads/deploy'
1818
with:
1919
github_token: ${{ secrets.GITHUB_TOKEN }}
2020
publish_dir: ./public
21+

0 commit comments

Comments
 (0)