From 33fc65f861c7c0893f1be215f3db11d94fc28006 Mon Sep 17 00:00:00 2001 From: Ajit Kumar Date: Fri, 16 Feb 2024 17:15:27 +0900 Subject: [PATCH] Update main.yml Replace actions setting using hugging face --- .github/workflows/main.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 842c01a..dfc7e41 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,24 +1,24 @@ name: Sync to Hugging Face hub -on: - push: - branches: [main] +on: + push: + branches: [main] + + # to run this workflow manually from the Actions tab workflow_dispatch: - jobs: +jobs: sync-to-hub: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + lfs: true - name: Add remote - env: - HF: ${{secrets.HF}} - run: git remote add space https://huggingface.co/spaces/kumarajit/mlops-coursera + env: + HF_TOKEN: ${{ secrets.HF_TOKEN }} + run: git remote add space https://kumarajit:$HF_TOKEN@huggingface.co/spaces/kumarajit/mlops-coursera - name: Push to hub - env: - HF: ${{secrets.HF}} - run: git push --force https://huggingface.co/spaces/kumarajit/mlops-coursera main - - - + env: + HF_TOKEN: ${{ secrets.HF_TOKEN }} + run: git push https://kumarajit:$HF_TOKEN@huggingface.co/spaces/kumarajit/mlops-coursera