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