Skip to content

Commit e13648e

Browse files
committed
Use Hugo in container to build blog
1 parent e9c4822 commit e13648e

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

Diff for: .github/workflows/gh-pages.yml

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
1-
name: github pages
2-
1+
name: Build and publish blog
32
on:
43
push:
54
branches:
6-
- main # Set a branch to deploy
7-
pull_request:
8-
5+
- "main"
6+
pull_request: {}
97
jobs:
10-
deploy:
11-
runs-on: ubuntu-20.04
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os:
14+
- ubuntu-latest
1215
steps:
1316
- uses: actions/checkout@v2
1417
with:
1518
submodules: true # Fetch Hugo themes (true OR recursive)
1619
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
17-
18-
- name: Setup Hugo
19-
uses: peaceiris/actions-hugo@v2
20-
with:
21-
hugo-version: '0.92.2'
22-
# extended: true
23-
2420
- name: Build
25-
run: hugo --minify
26-
21+
run: docker run --rm -v $PWD:/workspace ghcr.io/gbraad-redhat/hugo:0.127.0 --minify
2722
- name: Deploy
2823
uses: peaceiris/actions-gh-pages@v3
2924
if: github.ref == 'refs/heads/main'

Diff for: README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
CRC Blog
22
--------
33

4+
5+
## Build
6+
```shell
7+
$ git clone https://github.com/crc-org/blog
8+
$ cd blog
9+
$ git submodule update
10+
$ podman run --rm -v $PWD:/workspace ghcr.io/gbraad-redhat/hugo:0.127.0 --minify
11+
```

0 commit comments

Comments
 (0)