Spaces:
Running
Running
ReportRaahat CI commited on
Commit ·
a25d91c
1
Parent(s): 55f0858
Deploy from GitHub: d4acb8004bc34d3b085727572907830160610c97
Browse files
.github/workflows/deploy-hf.yml
CHANGED
|
@@ -16,6 +16,7 @@ jobs:
|
|
| 16 |
env:
|
| 17 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 18 |
HF_SPACE: ${{ vars.HF_SPACE_ID || 'CaffeinatedCoding/ReportRaahat' }}
|
|
|
|
| 19 |
run: |
|
| 20 |
# Configure git
|
| 21 |
git config --global user.email "ci@reportraahat.app"
|
|
@@ -44,6 +45,17 @@ jobs:
|
|
| 44 |
# Use the HF Spaces README (with metadata)
|
| 45 |
cp HF_README.md hf-space/README.md
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
# Push to HF
|
| 48 |
cd hf-space
|
| 49 |
git add -A
|
|
|
|
| 16 |
env:
|
| 17 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 18 |
HF_SPACE: ${{ vars.HF_SPACE_ID || 'CaffeinatedCoding/ReportRaahat' }}
|
| 19 |
+
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
|
| 20 |
run: |
|
| 21 |
# Configure git
|
| 22 |
git config --global user.email "ci@reportraahat.app"
|
|
|
|
| 45 |
# Use the HF Spaces README (with metadata)
|
| 46 |
cp HF_README.md hf-space/README.md
|
| 47 |
|
| 48 |
+
# Write backend .env with real secrets (from GitHub Secrets)
|
| 49 |
+
cat > hf-space/backend/.env << EOF
|
| 50 |
+
OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
| 51 |
+
HF_TOKEN=${HF_TOKEN}
|
| 52 |
+
HF_MODEL_ID=CaffeinatedCoding/reportraahat-simplifier
|
| 53 |
+
HF_INDEX_REPO=CaffeinatedCoding/reportraahat-indexes
|
| 54 |
+
NEXT_PUBLIC_API_URL=http://localhost:8000
|
| 55 |
+
EOF
|
| 56 |
+
# Remove leading whitespace from heredoc
|
| 57 |
+
sed -i 's/^ //' hf-space/backend/.env
|
| 58 |
+
|
| 59 |
# Push to HF
|
| 60 |
cd hf-space
|
| 61 |
git add -A
|