Skip to content

Commit 2ff091c

Browse files
committed
add github actions
1 parent 458f51f commit 2ff091c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy Hugo to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-go@v4
13+
with:
14+
go-version: "1.21"
15+
- run: go install github.com/gohugoio/hugo@latest
16+
- run: hugo -D
17+
- name: Deploy to GitHub Pages
18+
uses: peaceiris/actions-gh-pages@v3
19+
with:
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
publish_dir: ./public

0 commit comments

Comments
 (0)