fix: update git deployment logic in forgejo workflow
Some checks failed
/ build (push) Failing after 1m17s
Some checks failed
/ build (push) Failing after 1m17s
This commit is contained in:
parent
f611c3f0ef
commit
53b0362107
1 changed files with 7 additions and 10 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue