Skip to content

Commit 1b20a71

Browse files
committed
get latest hugo-version
1 parent 84fa59c commit 1b20a71

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
branches:
7-
- master # <-- 배포 기준 브랜치 (main 또는 master 확인 필요)
7+
- master
88
pull_request:
99

1010
env:
@@ -23,20 +23,12 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v4
2525
with:
26-
fetch-depth: 0 # .GitInfo 및 .Lastmod를 위해 전체 히스토리 가져오기
27-
28-
# [NEW] package.json에서 hugo-extended 버전 자동 추출
29-
- name: Get Hugo version from package.json
30-
id: hugo-version
31-
run: |
32-
HUGO_VERSION=$(npm pkg get dependencies.hugo-extended | tr -d '"')
33-
echo "Detected Hugo version: $HUGO_VERSION"
34-
echo "HUGO_VERSION=$HUGO_VERSION" >> $GITHUB_OUTPUT
26+
fetch-depth: 0
3527

3628
- name: Setup Hugo
3729
uses: peaceiris/actions-hugo@v3
3830
with:
39-
hugo-version: ${{ steps.hugo-version.outputs.HUGO_VERSION }}
31+
hugo-version: 'latest'
4032
extended: true
4133

4234
- name: Setup Node
@@ -51,6 +43,6 @@ jobs:
5143

5244
- name: Deploy
5345
uses: peaceiris/actions-gh-pages@v4
54-
if: ${{ github.ref == 'refs/heads/master' }} # <-- 브랜치 이름이 master인지 확인
46+
if: ${{ github.ref == 'refs/heads/master' }}
5547
with:
5648
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)