From 89a757196f3aaa9d98aa535368e535fe5a8d4e2f Mon Sep 17 00:00:00 2001 From: Mohamed Zumair Date: Sun, 1 Sep 2024 00:17:51 +0530 Subject: [PATCH] Create hf.yml --- .github/workflows/hf.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/hf.yml diff --git a/.github/workflows/hf.yml b/.github/workflows/hf.yml new file mode 100644 index 0000000..06412e0 --- /dev/null +++ b/.github/workflows/hf.yml @@ -0,0 +1,28 @@ +name: Sync to Hugging Face hub +on: + push: + branches: [main] + +jobs: + push_to_huggingface: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure Git + env: + GIT_NAME: ${{ secrets.GIT_NAME }} + GIT_EMAIL: ${{ secrets.GIT_EMAIL }} + run: | + git config --global user.name "$GIT_NAME" + git config --global user.email "$GIT_EMAIL" + + - name: Push to Hugging Face + env: + HF_TOKEN: ${{ secrets.HF_TOKEN }} + run: | + git push https://mhdzumair:$HF_TOKEN@huggingface.co/spaces/mhdzumair/mediaflow-proxy main -f