Download .github/workflows/deploy_space.yml from kedhar4/my-model: direct link, hf CLI and curl.
- Browser
- Download file 871 Bytes
-
https://huggingface.co/kedhar4/my-model/resolve/main/.github/workflows/deploy_space.yml
- Command line
-
hf download hf://kedhar4/my-model/.github/workflows/deploy_space.yml
-
curl -L -o deploy_space.yml https://huggingface.co/kedhar4/my-model/resolve/main/.github/workflows/deploy_space.yml
871 Bytes
| name: Deploy Space to Hugging Face | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install huggingface-hub | |
| - name: Configure git | |
| run: | | |
| git config --global user.email "actions@github.com" | |
| git config --global user.name "github-actions" | |
| - name: Deploy to HF Space via huggingface_hub | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| HF_USER: ${{ secrets.HF_USER }} | |
| SPACE_NAME: ${{ secrets.SPACE_NAME }} | |
| run: | | |
| python deploy_to_space_py.py --hf_user $HF_USER --space_name $SPACE_NAME --local_dir . | |