From 53b0362107fda910f4193f89d4424730b17f89ee Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 5 Jun 2026 23:09:22 +0200 Subject: [PATCH] fix: update git deployment logic in forgejo workflow --- .forgejo/workflows/playing-around.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/playing-around.yaml b/.forgejo/workflows/playing-around.yaml index 348d29c..f8a41cf 100644 --- a/.forgejo/workflows/playing-around.yaml +++ b/.forgejo/workflows/playing-around.yaml @@ -36,19 +36,16 @@ jobs: - name: Deploy dist to dist-${{ env.FORGEJO_REF_NAME }} run: | - git config user.name "forgejo-actions[bot]" - git config user.email "forgejo-actions[bot]@users.noreply.local" + git config --global user.name "forgejo-actions[bot]" + git config --global user.email "forgejo-actions[bot]@users.noreply.local" - git checkout --orphan temp + git clone "https://x-access-token:${{ secrets.FORGEJO_TOKEN }}@git.workaround.org/${{ github.repository }}.git" repo + cd repo + git checkout dist-${{ env.FORGEJO_REF_NAME }} || git checkout --orphan dist-${{ env.FORGEJO_REF_NAME }} git rm -rf . - - git add dist + git add ../dist git commit -m "Update dist for ${{ env.FORGEJO_REF_NAME }}" - - git push \ - "https://x-access-token:${{ secrets.FORGEJO_TOKEN }}@git.workaround.org/${{ github.repository }}.git" \ - temp:dist-${{ env.FORGEJO_REF_NAME }} \ - --force + git push origin dist-${{ env.FORGEJO_REF_NAME }} --force - name: Trigger deployment webhook env: