File size: 634 Bytes
81c67ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
name: Deploy to HuggingFace Spaces
on:
  push:
    branches: [ main ]
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    
    - name: Setup Node.js
      uses: actions/setup-node@v3
      with:
        node-version: '18'
        
    - name: Install dependencies
      run: npm install
      
    - name: Build application
      run: npm run build
      
    - name: Deploy to HuggingFace Spaces
      uses: huggingface/huggingface_hub@main
      with:
        HF_TOKEN: ${{ secrets.HF_TOKEN }}
        space_id: ${{ secrets.HF_SPACE_ID }}
        dockerfile: "Dockerfile"