Spaces:
Running
Running
Download .github/workflows/deploy.yml from Samad14/bio-nexus-api: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/.github/workflows/deploy.yml
- Command line
-
hf download hf://spaces/Samad14/bio-nexus-api/.github/workflows/deploy.yml
-
curl -L -o deploy.yml https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/.github/workflows/deploy.yml
1.15 kB
| name: Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| deploy-backend: | |
| name: Deploy Backend to HuggingFace Spaces | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Push to HuggingFace Spaces | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| pip install -U huggingface_hub | |
| hf upload Samad14/bio-nexus-api bioai-platform/backend --repo-type space --exclude "**/.env" --exclude "**/.env.deploy" --exclude "**/__pycache__/**" | |
| deploy-frontend: | |
| name: Deploy Frontend to Vercel | |
| runs-on: ubuntu-latest | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Ensure backend API URL is set | |
| run: npx vercel env add NEXT_PUBLIC_API_URL production https://samad14-bio-nexus-api.hf.space --project prj_ylJFEbddC3dQsqLVsKyhMWDMHqeG --scope team_y6MYl4hpatRBHMHSwAzCzQ5f --token "$VERCEL_TOKEN" || true | |
| - name: Deploy to Vercel | |
| run: npx vercel --token "$VERCEL_TOKEN" --project prj_ylJFEbddC3dQsqLVsKyhMWDMHqeG --scope team_y6MYl4hpatRBHMHSwAzCzQ5f --prod --yes | |