name: Deploy to Hugging Face Space on: push: branches: - main paths: - Dockerfile - .dockerignore - README.md - requirements.txt - pyproject.toml - package.json - tailwind.config.js - src/** - web/** - resources/** - scripts/** workflow_dispatch: concurrency: group: hf-space-deploy cancel-in-progress: true jobs: deploy: runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Push to Hugging Face Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git remote add hf-space "https://ArielJoe:${HF_TOKEN}@huggingface.co/spaces/ArielJoe/Prompt-Builder" git push --force hf-space HEAD:main