fix: update git deployment logic in forgejo workflow
Some checks failed
/ build (push) Failing after 1m17s

This commit is contained in:
Christoph Haas 2026-06-05 23:09:22 +02:00
parent f611c3f0ef
commit 53b0362107

View file

@ -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: