From f0e27896b338b3714c5eaf820c604554cc615eaf Mon Sep 17 00:00:00 2001 From: alex-bene Date: Wed, 29 May 2024 17:31:00 +0300 Subject: [PATCH] add README --- README.md | 25 +++++++++++++++++++++++++ action.yml | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c4167b2 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Sync With Hugging Face Space +This action creates a seperate README.md file with a yaml header prepended for Hugging Face 🤗 Space and syncs your updates with the space repo. + +A repo using this action can be found [here](https://github.com/alex-bene/BianqueNet). + +## Usage +```yaml +- uses: alex-bene/huggingface-space-sync-action@v0.1 + with: + # The github repo you are syncing from. Required. + github_repo_id: '' + # The branch of your github repo you want to sync from. Defaults to 'main'. Optional. + github_branch: 'main' + # The yaml headers file to use, e.g., hf_space_metadata.yml (will be prepended to your README.md in the HF space). Required. + yaml_header_path: '' + # The Hugging Face repo id you want to sync to. (ex. 'username/reponame'). Required. + huggingface_repo_id: '' + # Hugging Face token with write access and corresponding username. Required. + # Here, we provide a token that we called `HF_TOKEN` when we added the secret to our GitHub repo. + hf_username: '' + hf_token: ${{ secrets.HF_TOKEN }} +``` + +## License +The scripts and documentation in this project are released under the [MIT License](LICENSE). \ No newline at end of file diff --git a/action.yml b/action.yml index 8cec344..90417ab 100644 --- a/action.yml +++ b/action.yml @@ -20,8 +20,10 @@ inputs: type: string hf_username: required: true + type: string hf_token: required: true + type: string runs: using: "composite"