Skip to content

Commit 48ce656

Browse files
authored
Create hugo.yml workflow
1 parent ed21292 commit 48ce656

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/hugo.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: GitHub Pages Hugo Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master # Set a branch to deploy
7+
pull_request:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-22.04
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
submodules: true # Fetch Hugo themes (true OR recursive)
18+
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
19+
20+
- name: Setup Hugo
21+
uses: peaceiris/actions-hugo@v3
22+
with:
23+
hugo-version: '0.119.0'
24+
# extended: true
25+
26+
- name: Build
27+
run: hugo --minify
28+
29+
- name: Deploy
30+
uses: peaceiris/actions-gh-pages@v3
31+
if: github.ref == 'refs/heads/master'
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: ./public

0 commit comments

Comments
 (0)