Spaces:
Sleeping
Sleeping
Download .github/workflows/deploy.yml from sancloudmlops/flask-random-fruit: direct link, hf CLI and curl.
- Browser
- Download file 898 Bytes
-
https://huggingface.co/spaces/sancloudmlops/flask-random-fruit/resolve/main/.github/workflows/deploy.yml
- Command line
-
hf download hf://spaces/sancloudmlops/flask-random-fruit/.github/workflows/deploy.yml
-
curl -L -o deploy.yml https://huggingface.co/spaces/sancloudmlops/flask-random-fruit/resolve/main/.github/workflows/deploy.yml
898 Bytes
| name: Deploy to Hugging Face | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Git LFS | |
| run: git lfs install | |
| - name: Clone HF Space | |
| run: | | |
| git clone https://huggingface.co/spaces/sancloudmlops/flask-random-fruit hf-space | |
| - name: Copy files | |
| run: | | |
| rsync -av --exclude='.git' ./ hf-space/ | |
| - name: Commit & Push to HF | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| cd hf-space | |
| git config user.email "you@example.com" | |
| git config user.name "github-actions" | |
| git add . | |
| git commit -m "Deploy from GitHub" || echo "No changes" | |
| git push https://sancloudmlops:$HF_TOKEN@huggingface.co/spaces/sancloudmlops/flask-random-fruit main |