Skip to content

Commit 96ae7b2

Browse files
authored
Merge pull request #3 from itsallcode/hugo_ci
Hugo CI
2 parents dfc669f + e02c313 commit 96ae7b2

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/gh-pages.yml

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

0 commit comments

Comments
 (0)