From 115de55e1373220f0de9ad289d6ebb5b5a46985f Mon Sep 17 00:00:00 2001 From: Sven Steinert Date: Wed, 11 Feb 2026 12:18:59 +0100 Subject: [PATCH] modified: .gitea/workflows/deploy.yml --- .gitea/workflows/deploy.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 209affd..54dc005 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy static site +name: Deploy static site to pages on: push: @@ -8,21 +8,30 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Deploy to shared pages + - name: Deploy to shared pages volume run: | - set -e - OWNER="$(echo "$GITHUB_REPOSITORY" | cut -d/ -f1)" - REPO="$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)" + set -euo pipefail + + # Gitea/Actions exposes GitHub-compatible env var: + # GITHUB_REPOSITORY = "Owner/Repo" + OWNER="$(echo "${GITHUB_REPOSITORY}" | cut -d/ -f1)" + REPO="$(echo "${GITHUB_REPOSITORY}" | cut -d/ -f2)" + TARGET="/target/${OWNER}/${REPO}" + echo "Deploying ${GITHUB_REPOSITORY} -> ${TARGET}" + echo "Using docker volume: gitea_pages_root" + docker run --rm \ - -v pages_root:/target \ + -v gitea_pages_root:/target \ -v "$PWD":/src \ alpine:3.20 sh -lc ' apk add --no-cache rsync >/dev/null mkdir -p "'"$TARGET"'" rsync -av --delete /src/ "'"$TARGET"'"/ \ - --exclude ".git" --exclude ".gitea" + --exclude ".git" \ + --exclude ".gitea" '