From 3ce8d6efd353987d3651024308d84ce14139bcbc Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Sun, 14 Sep 2025 17:39:52 +0100 Subject: [PATCH] Add CI Signed-off-by: Nikolaos Karaolidis --- .gitea/Containerfile | 3 +++ .gitea/workflows/main.yaml | 46 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .gitea/Containerfile create mode 100644 .gitea/workflows/main.yaml diff --git a/.gitea/Containerfile b/.gitea/Containerfile new file mode 100644 index 0000000..dccdbad --- /dev/null +++ b/.gitea/Containerfile @@ -0,0 +1,3 @@ +FROM ghcr.io/catthehacker/ubuntu:act-latest + +RUN apt-get update && apt-get install -y hugo diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml new file mode 100644 index 0000000..af42840 --- /dev/null +++ b/.gitea/workflows/main.yaml @@ -0,0 +1,46 @@ +name: Build and Release Site + +on: + push: + branches: + - "**" + +jobs: + builder: + uses: karaolidis/workflows/.gitea/workflows/builder.yaml@main + with: + registry: git.karaolidis.com + username: ${{ github.repository_owner }} + secrets: + password: ${{ secrets.REGISTRY_PASSWORD }} + + release: + runs-on: nix + needs: builder + container: + image: ${{ needs.builder.outputs.tag }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Build Site + run: | + cd themes/caldwell + npm install + cd ../.. + ln -s ./themes/caldwell/node_modules node_modules + pwd + hugo --minify + + - name: Package + run: | + tar -czf site.tar.gz -C public . + + - name: Release + uses: https://github.com/akkuman/gitea-release-action@main + with: + name: "Release ${{ github.sha }}" + tag_name: "release-${{ github.sha }}" + files: site.tar.gz