From 8e7a524644b6796770317c8ac6483e397f0ca586 Mon Sep 17 00:00:00 2001 From: paul-loedige <59517210+ploedige@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:30:34 +0100 Subject: [PATCH] added the hugo-deploy action --- .gitea/workflows/hugo-deploy.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .gitea/workflows/hugo-deploy.yaml diff --git a/.gitea/workflows/hugo-deploy.yaml b/.gitea/workflows/hugo-deploy.yaml new file mode 100644 index 0000000..53f6ac7 --- /dev/null +++ b/.gitea/workflows/hugo-deploy.yaml @@ -0,0 +1,30 @@ +# gitea/actions/hugo-deploy.yml +name: Deploy Hugo Site + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Clone Repository + uses: actions/checkout@v3 + + - name: Install Hugo + run: | + apt-get update + apt-get install -y hugo + + - name: Build Hugo Site + run: hugo --minify + + - name: Deploy to Hugo Container + run: | + rsync -avz --delete public/ /mnt/hugo/ + env: + HUGO_CONTAINER_PATH: /mnt/hugo/ + GITEA_RUNNER_MOUNT_PATH: ./hugo/public:/mnt/hugo \ No newline at end of file