db_query / .github /workflows /kpi_analysis.yml
DavMelchi's picture
Add GitHub Actions workflow for Panel app deployment to Hugging Face Spaces with path-based triggers, VS Code project color customization, and comprehensive KPI health check drill-down documentation including group-based filtering, SLA benchmarking, timeline visualization, and complaint sites roadmap
f68be5e
name: Sync Panel (kpi_analysis) to Hugging Face
on:
push:
branches: [main]
paths:
- "panel_app/**"
- "process_kpi/**"
- "utils/**"
- "data/**"
- "physical_db/**"
- "hf_spaces/kpi_analysis/**"
- ".github/workflows/kpi_analysis.yml"
workflow_dispatch:
jobs:
sync-panel-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: false
- name: Build Space bundle
run: |
rm -rf hf_space
mkdir -p hf_space
# Space root files
cp -r hf_spaces/kpi_analysis/* hf_space/
# App code + shared modules
cp -r panel_app hf_space/
cp -r process_kpi hf_space/
cp -r utils hf_space/
# Data files needed by the app
cp -r data hf_space/
cp -r physical_db hf_space/
- name: Push bundle to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
cd hf_space
git init
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add -A
git commit -m "Deploy Panel Space" || true
git branch -M main
git remote add hf https://DavMelchi:$HF_TOKEN@huggingface.co/spaces/DavMelchi/kpi_analysis
git push --force hf main