From cfcb32b7430391b55598b6412404528d5003212d Mon Sep 17 00:00:00 2001 From: Mohamed Hisham Abdelzaher Date: Mon, 11 Mar 2024 04:41:35 +0200 Subject: [PATCH] Update Hugging Face sync workflow --- .github/workflows/huggingface-sync.yml | 40 +++++++++++++++----------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/huggingface-sync.yml b/.github/workflows/huggingface-sync.yml index fc31168..067de77 100644 --- a/.github/workflows/huggingface-sync.yml +++ b/.github/workflows/huggingface-sync.yml @@ -1,20 +1,26 @@ name: Sync With Hugging Face Hub - on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - workflow_dispatch: + push: + branches: ["master"] + pull_request: + branches: ["master"] + workflow_dispatch: jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Sync With Hugging Face Hub - uses: nateraw/huggingface-sync-action@v0.0.5 - with: - github_repo_id: "MH0386/napoleon_dataset" - huggingface_repo_id: "MH0386/napoleon_bonaparte" - hf_token: ${{ secrets.HF_TOKEN }} - repo_type: "dataset" + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + - name: Set up Cache + uses: actions/cache@v4.0.1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/.gitignore') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Sync With Hugging Face Hub + uses: nateraw/huggingface-sync-action@v0.0.5 + with: + github_repo_id: "MH0386/napoleon_dataset" + huggingface_repo_id: "MH0386/napoleon_bonaparte" + hf_token: ${{ secrets.HF_TOKEN }} + repo_type: "dataset"