From 37209848a7009ecc886b822907bec49de3fef276 Mon Sep 17 00:00:00 2001 From: Reinaldo Chaves Date: Sun, 29 Sep 2024 17:45:14 -0300 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 49b4289..0f9874f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,11 +18,24 @@ jobs: run: | git config user.name github-actions git config user.email github-actions@github.com + git config pull.rebase false - - name: Pull from hub + - name: Fetch from hub env: HF_TOKEN: ${{ secrets.HF_TOKEN }} - run: git pull https://reichaves:$HF_TOKEN@huggingface.co/spaces/reichaves/Chatbot-Gemma2-9b-It-all-MiniLM-L6-v2-Brazil-PDF main --allow-unrelated-histories + run: git fetch https://reichaves:$HF_TOKEN@huggingface.co/spaces/reichaves/Chatbot-Gemma2-9b-It-all-MiniLM-L6-v2-Brazil-PDF main + + - name: Merge changes + run: | + git merge FETCH_HEAD --allow-unrelated-histories -m "Merge Hugging Face changes" + continue-on-error: true + + - name: Check for merge conflicts + run: | + if git ls-files -u | grep -q '^'; then + echo "Merge conflicts detected. Please resolve them manually." + exit 1 + fi - name: Push to hub env: