|
name: Sync to Hugging Face hub |
|
on: |
|
push: |
|
branches: [main] |
|
|
|
|
|
workflow_dispatch: |
|
|
|
jobs: |
|
sync-to-hub: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- uses: actions/checkout@v3 |
|
with: |
|
fetch-depth: 0 |
|
lfs: true |
|
|
|
- name: Push to hub |
|
env: |
|
|
|
HF_TOKEN: ${{ secrets.HF_TOKEN }} |
|
|
|
FERNET_KEY: ${{ secrets.FERNET_KEY }} |
|
|
|
COMET_API_KEY: ${{ secrets.COMET_API_KEY }} |
|
COMET_WORKSPACE: ${{ secrets.COMET_WORKSPACE }} |
|
COMET_PROJECT_NAME: ${{ secrets.COMET_PROJECT_NAME }} |
|
run: | |
|
# This command uses the HF_TOKEN to push to Hugging Face Spaces. |
|
# The other secrets (FERNET_KEY, COMET_*) are now available as |
|
# environment variables for any subsequent Python scripts or commands |
|
# that the 'run' block might execute. |
|
# |
|
# For example, if you had a Python script called 'test_encryption.py' |
|
# that uses FERNET_KEY, you could run it here: |
|
# python test_encryption.py |
|
# |
|
# Or if you were doing Comet ML logging directly from the action: |
|
# python train_model.py |
|
|
|
|
|
git push --force https://nlpblogs:$HF_TOKEN@huggingface.co/spaces/AIEcosystem/Scandinavian-JSON-Entity-Finder main |
|
|