Skip to content

Commit c54c154

Browse files
author
ma.jinyun
committed
fix error
1 parent 680b2ad commit c54c154

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

.github/._workflows

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
with:
3131
github_token: ${{ secrets.GITHUB_TOKEN }}
3232
publish_dir: ./public
33-
publish_branch: gh-pages # 明确指定目标分支
33+
publish_branch: gh-pages # 明确指定目标分支

.github/workflows/gh-pages.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-22.04 # 固定使用22.04版本
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4 # 升级到v4版本
14+
with:
15+
submodules: recursive # 改为更明确的recursive
16+
fetch-depth: 0
17+
18+
- name: Setup Hugo
19+
uses: peaceiris/actions-hugo@v2
20+
with:
21+
hugo-version: "latest"
22+
extended: true
23+
24+
- name: Build site
25+
run: hugo --minify
26+
27+
- name: Deploy to gh-pages
28+
uses: peaceiris/actions-gh-pages@v3
29+
if: github.ref == 'refs/heads/master'
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./public
33+
publish_branch: gh-pages # 明确指定目标分支

.github/workflows/gp.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ jobs:
1919
env:
2020
HUGO_VERSION: 0.125.0
2121
steps:
22-
# 覆盖潜在的旧版依赖
23-
- name: Patch Actions Dependency
24-
uses: actions/upload-artifact@v4
25-
if: true
2622

2723
- name: Install Hugo CLI
2824
run: |

0 commit comments

Comments
 (0)