Skip to content

Commit

Permalink
Update build, hugo and nginx. (#23)
Browse files Browse the repository at this point in the history
* build: Update GitHub actions.

* docker: Use nginx 1.26 (latest stable)

* build: Update to hugo 0.134.0

- Add a trailing slash to baseURL as expected by the new hugo version.
- Use the newer css.Sass instead of deprecated resources.ToCSS
  • Loading branch information
jholdstock authored Sep 5, 2024
1 parent dc3330d commit 6a33a54
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Tests
run: ./bin/test.sh
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build the Docker image
run: docker build -t companyzero/bisonrelay-web:$(date +%s) .
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
FROM alpine:latest

ARG HUGO_BASEURL
ENV HUGO_BASEURL ${HUGO_BASEURL:-https://bisonrelay.org}
ENV HUGO_VERSION 0.110.0
ENV HUGO_BASEURL ${HUGO_BASEURL:-https://bisonrelay.org/}
ENV HUGO_VERSION 0.134.0

LABEL description="gohugo build"
LABEL version="1.0"
Expand All @@ -25,7 +25,7 @@ RUN bin/build-hugo.sh
# Serve image (stable nginx version)
# This cannot use Alpine because test/Dockerfile builds on this image and
# expects it to have apt-get.
FROM nginx:1.22
FROM nginx:1.26

LABEL description="bisonrelay-web server"
LABEL version="1.0"
Expand Down
2 changes: 1 addition & 1 deletion bin/watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ hugo server \
--buildDrafts \
--disableFastRender \
--source src \
--baseURL http://localhost:1313
--baseURL http://localhost:1313/
2 changes: 1 addition & 1 deletion src/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<!-- Compile and load scss. -->
{{ $scssOptions := (dict "targetPath" "br.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "scss/br.scss" | resources.ToCSS $scssOptions | resources.Fingerprint }}
{{ $style := resources.Get "scss/br.scss" | css.Sass $scssOptions | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">

<!-- Custom favicon -->
Expand Down

0 comments on commit 6a33a54

Please sign in to comment.