File size: 937 Bytes
9729a57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy to Hugging Face Spaces

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.10'
    
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
    
    - name: Test application
      run: |
        python -c "import app; print('App imports successfully')"
    
    - name: Deploy to Hugging Face Spaces
      if: github.ref == 'refs/heads/main'
      env:
        HF_TOKEN: ${{ secrets.HF_TOKEN }}
      run: |
        git config --global user.email "action@github.com"
        git config --global user.name "GitHub Action"
        git remote add hf https://huggingface.co/spaces/YOUR_USERNAME/lecture-capture-ai
        git push hf main