Files
blog/.gitea/workflows/hugo-deploy.yml
bojemoi a7a433f331
Some checks failed
Hugo Build & Deploy / build-deploy (push) Failing after 10s
Use native git clone instead of actions/checkout (no node needed)
2026-02-06 20:02:54 +01:00

29 lines
695 B
YAML

name: Hugo Build & Deploy
on:
push:
branches: [main]
jobs:
build-deploy:
runs-on: ubuntu-latest
container:
image: alpine:3.19
volumes:
- /var/www/blog.bojemoi.me:/deploy
steps:
- name: Install dependencies
run: apk add --no-cache hugo git
- name: Checkout repo
run: |
git clone --depth 1 --branch "${GITHUB_REF_NAME}" "http://gitea:3000/${GITHUB_REPOSITORY}.git" .
- name: Build Hugo site
run: hugo --minify
- name: Deploy to web root
run: |
rm -rf /deploy/*
cp -r public/* /deploy/
echo "Deployed $(date -u '+%Y-%m-%d %H:%M:%S UTC')" > /deploy/.deployed