Files
JirR02 21fb74052d
Build and Deploy Hugo Site / build-and-deploy (push) Successful in 10s
ZHAW Website V. 2.3.1
2026-11-04 08:27:29 +01:00

47 lines
1.0 KiB
YAML

name: Build and Deploy Hugo Site
on:
push:
branches:
- master
schedule:
- cron: '0 0 10 12 *'
- cron: '0 0 9 1 *'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
volumes:
- /home/rock/srv/alpha/ethwiki/html:/nginx
steps:
- uses: actions/checkout@v4.1.1
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3.0.0
with:
hugo-version: "latest"
extended: true
- name: Update hugo modules
run: |
# update to latest version of all modules
hugo mod get -u
# update the npm dependencies
hugo mod npm pack
# cleanup go.sum file
hugo mod tidy
- name: Build Site
working-directory: /workspace/EDU/zhaw_website
run: hugo --minify --buildFuture
- name: Clen Ngninx Folder and Deploy to Nginx Folder
working-directory: /workspace/EDU/zhaw_website
run: |
rm -rf /nginx/*
cp -R public/* /nginx