File size: 1,353 Bytes
7ba388d
 
 
 
 
 
 
 
 
 
 
 
 
 
e73a5f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ba388d
 
 
e73a5f7
 
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
38
39
40
41
42
43
44
45
name: Uploading on Huggingface
on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  sync-to-hub:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
          lfs: true
      - name: Set Git identity
        run: |
          git config --global user.email "[email protected]"
          git config --global user.name "GitHub Actions"

      - name: Update README.md
        run: |
          tmp_file=$(mktemp)
          echo "---" >> $tmp_file
          echo "title: Headshot" >> $tmp_file
          echo "emoji: 🏹" >> $tmp_file
          echo "colorFrom: purple" >> $tmp_file
          echo "colorTo: blue" >> $tmp_file
          echo "sdk: streamlit" >> $tmp_file
          echo "sdk_version: 1.29.0" >> $tmp_file
          echo "app_file: space.py" >> $tmp_file
          echo "pinned: false" >> $tmp_file
          echo "license: openrail" >> $tmp_file
          echo "---" >> $tmp_file
          echo "" >> $tmp_file
          cat README.md >> $tmp_file
          mv $tmp_file README.md
          git add README.md
          git commit -m "Updated README.md"

      - name: Push to hub
        env:
          HF_TOKEN: ${{ secrets.HF_TOKEN }}
        run: |
          git push https://zaibutcooler:[email protected]/spaces/zaibutcooler/headshot --force main