n8n-dan / .github /workflows /deploy-to-hf.yml
danilonovais's picture
fix: update Hugging Face deployment workflow to improve script execution and formatting
fe48307
raw
history blame
1.04 kB
name: Deploy to Hugging Face Space
on:
push:
branches: ["main"]
tags:
- "n8n-v*"
workflow_dispatch:
jobs:
push-to-hf-space:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "ci-bot"
git config user.email "ci@example.com"
- name: Push to HF Space repo
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# TODO: replace with your Space path
HF_SPACE_REPO="https://huggingface.co/spaces/danilonovais/n8n-dan"
git remote add hf "https://user:${HF_TOKEN}@${HF_SPACE_REPO#https://}"
git push hf HEAD:main --force
- name: Trigger Space build
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_SPACE_ID: danilonovais/n8n-dan
run: |
curl -X POST \
-H "Authorization: Bears " \
https://huggingface.co/api/spaces//build