From ed00fd56bbf95a2e6317f8e9d6d72d5568029d41 Mon Sep 17 00:00:00 2001 From: YaKun9 <131952790+YaKun9@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:15:15 +0800 Subject: [PATCH] Update sync.yml --- .github/workflows/sync.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index d3e1cfc..bf010b0 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -31,11 +31,13 @@ jobs: - name: Copy Gitea repository content excluding workflows run: | rsync -av --exclude='.github/workflows' gitea_repo/ . - + - name: Commit and push changes to GitHub env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | + git rm -r --cached gitea_repo + git pull --rebase git add -A git commit -m "Sync from Gitea repository" || echo "No changes to commit" git push https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }}