Skip to content

Commit

Permalink
Merge pull request #21 from theochem/sync_hf
Browse files Browse the repository at this point in the history
Add GitHub action to sync repo to Hugging Face model
  • Loading branch information
FanwangM authored Oct 7, 2023
2 parents 1815b81 + 2d9d1c7 commit f9786e2
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/sync_to_hugging_face.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Sync to Hugging Face space

on:
push:
branches: [main]

# to run this workflow manually from the Actions tab
# workflow_dispatch:

jobs:
sync-to-space:
runs-on: ubuntu-latest
steps:
- uses: nateraw/[email protected]
with:
github_repo_id: theochem/B3clf
huggingface_repo_id: legend1234/B3clf
# Hugging Face token with write access. Required.
# Here, we provide a token that we called `HF_TOKEN` when we added the secret to our GitHub repo.
hf_token: ${{ secrets.HUGGING_FACE_TOKEN }}
# The type of repo you are syncing to: model, dataset, or space.
# Defaults to space.
repo_type: "model"

# If true and the Hugging Face repo doesn't already exist, it will be created
# as a private repo.
# Note: this param has no effect if the repo already exists.
private: false

# If repo type is space, specify a space_sdk. One of: streamlit, gradio, or static
# This option is especially important if the repo has not been created yet.
# It won't really be used if the repo already exists.
space_sdk: "gradio"

# If provided, subdirectory will determine which directory of the repo will be synced.
# By default, this action syncs the entire GitHub repo.
#
# An example using this option can be seen here:
# https://github.com/huggingface/fuego/blob/830ed98/.github/workflows/sync-with-huggingface.yml
subdirectory: ""

0 comments on commit f9786e2

Please sign in to comment.