Spaces:
Sleeping
Sleeping
Aditya "Sree" Sreevatsa K
ci: support GitHub main/master deployment to Hugging Face main
8522e57 unverified Download .github/workflows/deploy.yml from AdityaSreevatsaK/Utility-Shelf: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/spaces/AdityaSreevatsaK/Utility-Shelf/resolve/main/.github/workflows/deploy.yml
- Command line
-
hf download hf://spaces/AdityaSreevatsaK/Utility-Shelf/.github/workflows/deploy.yml
-
curl -L -o deploy.yml https://huggingface.co/spaces/AdityaSreevatsaK/Utility-Shelf/resolve/main/.github/workflows/deploy.yml
1.51 kB
| name: Deploy to Hugging Face Space | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: utility-shelf-deployment | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Push to Hugging Face | |
| run: | | |
| git config --global user.email "actions@github.com" | |
| git config --global user.name "GitHub Actions" | |
| git remote add hf https://__token__:${HF_TOKEN}@huggingface.co/spaces/AdityaSreevatsaK/Utility-Shelf | |
| git push hf HEAD:main | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_UTILITY_SHELF_TOKEN }} | |
| - name: Check Hugging Face build and runtime | |
| env: | |
| EXPECTED_SHA: ${{ github.sha }} | |
| run: python scripts/check_hf_space.py --repo AdityaSreevatsaK/Utility-Shelf --expected-sha "$EXPECTED_SHA" | |
| - name: Show Hugging Face build logs on failure | |
| if: failure() | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_UTILITY_SHELF_TOKEN }} | |
| run: | | |
| echo "Reading last 120 Space build log lines (credentials are masked)..." | |
| curl --fail --silent --show-error --max-time 15 \ | |
| --header "Authorization: Bearer ${HF_TOKEN}" \ | |
| "https://huggingface.co/api/spaces/AdityaSreevatsaK/Utility-Shelf/logs/build?tail=120" \ | |
| | tail -n 120 || true | |