Skip to content

Commit 3e20a24

Browse files
committed
workflow: build hugo for gh-pages
Signed-off-by: Morten Linderud <[email protected]>
1 parent c1c0e29 commit 3e20a24

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/gh-pages.yml

+35
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
7+
pull_request:
8+
9+
jobs:
10+
deploy:
11+
if: github.repository == 'uapi-group/specifications'
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
19+
fetch-depth: 0
20+
21+
- name: Setup Hugo
22+
uses: peaceiris/actions-hugo@v2
23+
with:
24+
hugo-version: '0.104.3'
25+
extended: true
26+
27+
- name: Build
28+
run: cd website && hugo --minify -d ../public
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)