feat: move to hugo
All checks were successful
Build and deploy website / Build and Push Hugo Site (push) Successful in 36s

This commit is contained in:
Radu C. Martin 2025-04-06 18:16:14 +02:00
parent 06e94159b1
commit 21dcebdc33
45 changed files with 494 additions and 609 deletions

View file

@ -16,7 +16,7 @@ concurrency:
jobs:
build-push:
name: Build and Push Jekyll Site
name: Build and Push Hugo Site
runs-on: ubuntu-latest
steps:
@ -24,33 +24,35 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
# submodules: true
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
# Build and test site
- name: Setup Ruby
uses: https://github.com/ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Build site
run: bundle exec jekyll b -d _site
- name: Cache Hugo resources
uses: actions/cache@v4
env:
JEKYLL_ENV: "production"
cache-name: cache-hugo-resources
with:
path: resources
key: ${{ env.cache-name }}
- name: Test site
run: |
bundle exec htmlproofer _site \
\-\-disable-external \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
- uses: actions/setup-go@v5
with:
go-version: "^1.17.0"
- run: go version
- name: Setup Hugo
uses: https://github.com/peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build
run: hugo --minify --gc
- name: Copy website to destination server
uses: https://github.com/garygrossgarten/github-action-scp@release
with:
local: _site
local: public
remote: /srv/docker/nginx/html/blog
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}