Skip to content

Commit

Permalink
Use Hugo in container to build blog
Browse files Browse the repository at this point in the history
  • Loading branch information
gbraad committed Nov 26, 2024
1 parent e9c4822 commit e13648e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
name: github pages

name: Build and publish blog
on:
push:
branches:
- main # Set a branch to deploy
pull_request:

- "main"
pull_request: {}
jobs:
deploy:
runs-on: ubuntu-20.04
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.92.2'
# extended: true

- name: Build
run: hugo --minify

run: docker run --rm -v $PWD:/workspace ghcr.io/gbraad-redhat/hugo:0.127.0 --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
CRC Blog
--------


## Build
```shell
$ git clone https://github.com/crc-org/blog
$ cd blog
$ git submodule update
$ podman run --rm -v $PWD:/workspace ghcr.io/gbraad-redhat/hugo:0.127.0 --minify
```

0 comments on commit e13648e

Please sign in to comment.