Skip to content

Commit e1e44b8

Browse files
committed
Create main.yml
1 parent 7ca3178 commit e1e44b8

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/main.yml

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

0 commit comments

Comments
 (0)