Files
wiki/.gitea/workflows/deploy.yaml
wompmacho 3ae6d4a3dd
All checks were successful
Deploy to Caddy / build-and-deploy (push) Successful in 24s
take 2
2026-03-13 02:19:54 +00:00

31 lines
783 B
YAML

name: Deploy to Caddy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# This block tells the runner to mount the host volume into the build container
container:
image: hugomods/hugo:latest
options: --user root -v /srv/caddy/sites:/deploy
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Build Hugo
run: hugo --minify --destination public
- name: Deploy to Caddy
run: |
# The container now sees the host's /srv/caddy/sites as /deploy
mkdir -p /deploy/wiki
# Clean old files and move new ones
rm -rf /deploy/wiki/*
cp -r public/* /deploy/wiki/