| name: Deploy to HF Space | |
| on: | |
| push: | |
| branches: [main] | |
| # to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| deploy-to-space: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Push to HF space | |
| env: | |
| HF_API_KEY: ${{ secrets.HF_API_KEY }} | |
| SPACE_ID: ${{ secrets.SPACE_ID }} | |
| run: git push https://xarical:$HF_API_KEY@huggingface.co/spaces/$SPACE_ID main | |